aboutsummaryrefslogtreecommitdiff
path: root/mkshrc
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2016-02-15 16:08:16 -0500
committerMitch Riedstra <mitch@riedstra.us>2016-02-15 16:08:16 -0500
commit8f2b9316d1b1787503349c394c57c674ab5da443 (patch)
tree57c43d83d6f98c49dec9dcf66880922fa5e4ba2c /mkshrc
parentd32ab30dc3611481cb55ce7b18bb1a80352f9146 (diff)
downloaddotfiles-8f2b9316d1b1787503349c394c57c674ab5da443.tar.gz
dotfiles-8f2b9316d1b1787503349c394c57c674ab5da443.tar.xz
Misc updates to multiple config files
Diffstat (limited to 'mkshrc')
-rw-r--r--mkshrc24
1 files changed, 19 insertions, 5 deletions
diff --git a/mkshrc b/mkshrc
index 0ea8be6..15b76e2 100644
--- a/mkshrc
+++ b/mkshrc
@@ -162,6 +162,20 @@ debugstarttls() {
# |_| |_|_|___/\___| |_| \__,_|_| |_|\___|\__|_|\___/|_| |_|___/
#
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+# First argument is the interface on which to scan
+ipv6_local_hosts() {
+if ! [ -z $1 ] ; then
+ interface="$1"
+ ping6 -c 3 ff02::2%$interface \
+ | grep 'bytes from' \
+ | awk '{print $4}' \
+ | sort \
+ | uniq \
+ | sed -e's/:$//'
+else
+ echo "You need to specify an interface"
+fi
+}
set_nocaps() {
setxkbmap -option ctrl:nocaps
}
@@ -246,7 +260,7 @@ else
# When we detach from it, kill the session
tmux kill-session -t $session_id
fi
-fi
+fi
' > $location && chmod +x $location && echo "Installed to: $location"
}
@@ -290,17 +304,17 @@ startup_zram() {
}
# Sometimes useful function for unmounting a chroot dir on Linux
umount_recursive() {
- case $1 in
+ case $1 in
-h|--help|"")
cat <<-EOF
Specifiy the full path to the mountpoint
- and this function will do it's best to
+ and this function will do it's best to
unmount all child filesystems and the path
specified
Example:
$0 /path/to/filesystem/with/lots/of/mountpoints
Options:
- -f|--force
+ -f|--force
EOF
;;
-f|--force)
@@ -539,7 +553,7 @@ export CA_CERT="/srv/ssl/root.pem"
export CA_KEY="/srv/ssl/root.key"
-# Load our system profile
+# Load our system profile
. /etc/profile
# Load pre config