mactest=$(arp -n -a $gateway | awk '{print $4}' | head -1)
fi
- date >> /tmp/nm.set
- echo "$1 $2" >> /tmp/nm.set
- set >> /tmp/nm.set
- echo >> /tmp/nm.set
+date >> /tmp/nm.set
+echo "$1 $2" >> /tmp/nm.set
+set >> /tmp/nm.set
+echo >> /tmp/nm.set
+
case "$2" in
up|vpn-up)
if [ "$CONNECTION_UUID" == "$targetuuid" -o "$CONNECTION_UUID" == "$vpnuuid" -o "$mactest" == "$targetmac" ]
do
sudo -u $user /usr/bin/network-bookmarks-add
done
+
+ # Schedule a backup run for 10 minutes name - makes sure we don't
+ # try and do a backup if someone is only hoping on the network for
+ # a short time.
+ if [ -f /usr/lib/etc-obnam/run-backup ]
+ then
+ echo /usr/lib/etc-obnam/run-backup | at now + 10 minutes
+ fi
else
echo "On a foreign network, make sure we clean up" >> /tmp/nm.set
for user in $(ls /home/*/.gtk-bookmarks | sed 's/\/home\///; s/\/.*//')