-
authorhackbard <hackbard>
Mon, 25 Aug 2003 20:03:18 +0000 (20:03 +0000)
committerhackbard <hackbard>
Mon, 25 Aug 2003 20:03:18 +0000 (20:03 +0000)
backup.sh
check_dsl.sh [new file with mode: 0755]

index 648fdae..709c128 100755 (executable)
--- a/backup.sh
+++ b/backup.sh
@@ -165,7 +165,7 @@ if [ "$host" = "gate" ] ; then
 
 fi
 
-# hackstation specific data
+# hackstation / mobile / hdw / sparc specific data
 if [ "$host" = "hackstation" -o "$host" = "mobile" -o "$host" = "hdw" -o "$host" = "sparc" ] ; then
 
        # home of hackbard
@@ -186,6 +186,9 @@ if [ "$host" = "hackstation" -o "$host" = "mobile" -o "$host" = "hdw" -o "$host"
        done
        cp -r /home/hackbard/.ssh ./home/hackbard
 
+       # hunz config
+       if [ -f /home/hackbard/hunz.sh ] && cp /home/hackbard/hunz.sh ./home/hackbard
+
 fi
 
 
diff --git a/check_dsl.sh b/check_dsl.sh
new file mode 100755 (executable)
index 0000000..8853032
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# check for dsl connection. 
+
+if [ -z "`/sbin/ifconfig | grep ppp0`" ]; then
+       echo "`date`: trying to connect to the world again ..." >> \
+               /var/log/messages 2>&1
+       #
+       # start isdn if it works ...
+       # /etc/init.d/isdn start
+       #
+       
+       # by now: retry every 10 minuites if broken
+       /etc/init.d/rp-pppoe start
+       RETVAL=$?
+       echo "debug: RETVAL = $RETVAL" >> /var/log/messages 2>&1
+       [ "$RETVAL" = "0" ] && /etc/ppp/ip-up
+fi
+