]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/initscripts/init.d/connectd
Skip checkfstab if root is set by UUID.
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / connectd
index b9f0ebb6ad28c469df3ff1d05ad725bff126b179..75d51d26005e0ecd182f75d4d5b70130717f38a7 100644 (file)
@@ -18,6 +18,10 @@ if [ ! $HOLDOFF ]; then
        HOLDOFF=30
 fi
 
+if [ "$RECONNECTION" = "dialondemand" ]; then
+       exit 0
+fi
+
 msg_log () {
        logger -t $(basename $0)[$$] $*
 }
@@ -66,6 +70,9 @@ case "$1" in
                                rm -f /var/ipfire/ppp/settings
                                cp "/var/ipfire/ppp/settings-${BACKUPPROFILE}" /var/ipfire/ppp/settings
                                msg_log "Switched to backup profile ${BACKUPPROFILE}"
+                               # to be shure the right secrets are used
+        eval $(/usr/local/bin/readhash /var/ipfire/ppp/settings-${BACKUPPROFILE})
+        echo "'$USERNAME' * '$PASSWORD'" > /var/ipfire/ppp/secrets
                        else
                                msg_log "No backup profile given. Exiting."
                                exit 0
@@ -74,16 +81,16 @@ case "$1" in
                        echo $ATTEMPTS > /var/ipfire/red/keepconnected
                        sleep ${HOLDOFF}
                fi
-               
-               /etc/rc.d/init.d/network start red &
+               /etc/rc.d/init.d/network start red >/dev/tty12 2>&1 </dev/tty12 &
                ;;
                
   reconnect)
                while ( ps ax | grep -q [p]ppd ); do
+                       msg_log "There is a pppd still running. Waiting 2 seconds for exit."
                        sleep 2
                done
                
-               /etc/rc.d/init.d/network restart red &
+               /etc/rc.d/init.d/network restart red
                ;;
                
   *)