]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/blobdiff - src/initscripts/system/connectd
Merge branch 'master' of ssh://git.ipfire.org/pub/git/ipfire-2.x
[people/mfischer/ipfire-2.x.git] / src / initscripts / system / connectd
index 75d51d26005e0ecd182f75d4d5b70130717f38a7..5ab1861089150e0d54484c6c73e4a75f70682d19 100644 (file)
@@ -1,7 +1,25 @@
 #!/bin/bash
-#
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007-2022  IPFire Team  <info@ipfire.org>                     #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
 
-. /etc/sysconfig/rc 
+. /etc/sysconfig/rc
 . ${rc_functions}
 
 # Stop if nothing is configured
@@ -39,7 +57,7 @@ case "$1" in
   start)
        boot_mesg "Starting connection daemon..."
        echo_ok
-               
+
                while [ "$COUNT" -lt "$MAX" ]; do
                        if [ ! -e "/var/ipfire/red/keepconnected" ]; then
                                # User pressed disconnect in gui
@@ -59,9 +77,9 @@ case "$1" in
                        sleep 5
                        (( COUNT+=1 ))
                done
-               
+
                /etc/rc.d/init.d/network stop red
-               
+
                (( ATTEMPTS+=1 ))
                msg_log "Reconnecting: Attempt ${ATTEMPTS} of ${MAXRETRIES}"
                if [ "${ATTEMPTS}" -ge "${MAXRETRIES}" ]; then
@@ -83,16 +101,16 @@ case "$1" in
                fi
                /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
                ;;
-               
+
   *)
                echo "Usage: $0 {start|reconnect}"
                exit 1