]> git.etc.gen.nz Git - laptop-tools.git/commitdiff
A few minor tweaks.
authorAndrew Ruthven <puck@catalyst.net.nz>
Thu, 3 Apr 2014 09:54:28 +0000 (22:54 +1300)
committerAndrew Ruthven <puck@catalyst.net.nz>
Thu, 3 Apr 2014 09:54:28 +0000 (22:54 +1300)
NetworkManager/dispatcher.d/20network-shares

index d93f86c308f317eb5a306cd0c0fe74d7053edad0..215909928aede846b87d432cbea9513d35f6bb80 100755 (executable)
@@ -8,7 +8,7 @@ gateway=$(ip route show 0.0.0.0/0 | awk '{print $3}')
 if [ "x$gateway" != "x" ]
 then
     ping -c 1 $gateway
-    mactest=$(arp -n -a $gateway | awk '{print $4}')
+    mactest=$(arp -n -a $gateway | awk '{print $4}' | head -1)
 fi
 
         date >> /tmp/nm.set
@@ -29,9 +29,9 @@ case "$2" in
             done
         else
             echo "On a foreign network, make sure we clean up" >> /tmp/nm.set
-            for user in $(ls /home/*/bin/network-bookmarks-remove | sed 's/\/home\///; s/\/.*//')
+            for user in $(ls /home/*/.gtk-bookmarks | sed 's/\/home\///; s/\/.*//')
             do
-                sudo -u $user /home/$user/bin/network-bookmarks-remove
+                sudo -u $user /usr/bin/network-bookmarks-remove
             done
 
             /etc/init.d/autofs stop