From c731a2949dfff90800fd7dbba943d58b3ee80059 Mon Sep 17 00:00:00 2001 From: hackbard Date: Mon, 25 Aug 2003 20:03:18 +0000 Subject: [PATCH] - --- backup.sh | 5 ++++- check_dsl.sh | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100755 check_dsl.sh diff --git a/backup.sh b/backup.sh index 648fdae..709c128 100755 --- 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 index 0000000..8853032 --- /dev/null +++ b/check_dsl.sh @@ -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 + -- 2.20.1