small fixes
authorIan Kelling <ian@iankelling.org>
Fri, 9 Sep 2016 22:15:43 +0000 (15:15 -0700)
committerIan Kelling <ian@iankelling.org>
Thu, 4 May 2017 23:42:08 +0000 (16:42 -0700)
.bashrc

diff --git a/.bashrc b/.bashrc
index 912b678aac9c76bb8e67408ce6436125af0cc70b..dfc10aeaa90ab021500cacfc3b88cc81f82763a4 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -215,7 +215,7 @@ for _x in /a/bin/distro-functions/src/* /a/bin/!(githtml)/*-function?(s); do
 done
 unset _x
 # so I can share my bashrc
-for x in /a/bin/bash_unpublished/!(.#*); do source $x; done
+for x in /a/bin/bash_unpublished/source-!(.#*); do source $x; done
 source $(dirname $(readlink -f $BASH_SOURCE))/path_add-function
 source /a/bin/log-quiet/logq-function
 path_add /a/exe
@@ -1169,10 +1169,15 @@ vc() {
 transmission() {
     vc transmission-gtk&
     i=0
-    while ((i < 10)); do
+    while true; do
+        if ((i > 10)); then
+            echo "$0: error: vpn tun0 didn't show up"
+            return 1
+        fi
         tun_ip=$(s ip netns exec vpn ip a show dev tun0 | sed -rn 's/^ *inet (10\.8\.\S+).*/\1/p')
         [[ ! $tun_ip ]] || break
         sleep 1
+        i=$((i + 1))
     done
     echo "$0: tun_ip=$tun_ip"
     [[ $tun_ip ]] || { e "$0: error: no tun0 addr found"; return 1; }
@@ -1457,5 +1462,7 @@ path_add --end ~/.npm-global
 if [[ ! $DISPLAY && $XDG_VTNR == 1 ]] && shopt -q login_shell && isarch; then
     exec startx
 fi
+
+
 # ensure no bad programs appending to this file will have an affect
 return 0