]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
We use ifup/ifdown in brup/brdown.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 4 Feb 2009 20:24:08 +0000 (21:24 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 4 Feb 2009 20:24:08 +0000 (21:24 +0100)
src/initscripts/networking/brdown
src/initscripts/networking/brup

index 06b8ecad2635181b3f6dd3ad8c6185bbdfb3954d..68a005f4ef72f2297dc705277b3551182a52791b 100644 (file)
@@ -40,7 +40,7 @@ for file in ${FILES}; do
        fi
 
        # place interfaces at last position
-       if [[ "${file}" =~ "^nic" ]]; then
+       if [[ "${file}" =~ "^[0-9a-f][0-9a-f]\:[0-9a-f][0-9a-f]\:[0-9a-f][0-9a-f]\:[0-9a-f][0-9a-f]\:[0-9a-f][0-9a-f]\:[0-9a-f][0-9a-f]$" ]]; then
                FILES2="${FILES2} ${file}"
                continue
        fi
@@ -51,26 +51,14 @@ done
 FILES=${FILES2}
 
 # Process each configuration file
+export BRIDGE_DOWN=1
 for file in ${FILES}; do
        if [ ! -f "${file}" ]; then
                log_warning_msg
                message="${file} is not a network configuration file or directory."
                log_warning_msg
        fi
-
-       (
-               . ${file}
-
-               if [ -n "${SERVICE}" -a -x "${NETWORK_SCRIPTS}/services/${SERVICE}" ]; then
-                       IFCONFIG=${file} ${NETWORK_SCRIPTS}/services/${SERVICE} ${1} down
-               else
-                       echo -e "${FAILURE}Unable to process ${file}.  Either"
-                       echo -e "${FAILURE}the SERVICE variable was not set,"
-                       echo -e "${FAILURE}or the specified service cannot be executed."
-                       message=""
-                       log_failure_msg
-               fi
-       )
+       /etc/init.d/networking/ifdown ${file}
 done
 
 if [ -z "${2}" ]; then
index d163dd0fce3d36809940102025416f671c56d558..03afe7232c363573c3107e4ea6a61859610c63c3 100644 (file)
@@ -40,7 +40,7 @@ for file in ${FILES}; do
        fi
 
        # place interfaces at first position
-       if [[ "${file}" =~ "^nic" ]]; then
+       if [[ "${file}" =~ "^[0-9a-f][0-9a-f]\:[0-9a-f][0-9a-f]\:[0-9a-f][0-9a-f]\:[0-9a-f][0-9a-f]\:[0-9a-f][0-9a-f]\:[0-9a-f][0-9a-f]$" ]]; then
                FILES2="${file} ${FILES2}"
                continue
        fi
@@ -64,24 +64,13 @@ else
        log_warning_msg
 fi
 
+# Process each configuration file
+export BRIDGE_UP=1
 for file in ${FILES}; do
        if [ ! -f "${file}" ]; then
                log_warning_msg
                message="${file} is not a network configuration file or directory."
                log_warning_msg
        fi
-
-       (
-               . ${file}
-
-               if [ -n "${SERVICE}" -a -x "${NETWORK_SCRIPTS}/services/${SERVICE}" ]; then
-                       IFCONFIG=${file} ${NETWORK_SCRIPTS}/services/${SERVICE} ${1} up
-               else
-                       echo -e "${FAILURE}Unable to process ${file}.  Either"
-                       echo -e "${FAILURE}the SERVICE variable was not set,"
-                       echo -e "${FAILURE}or the specified service cannot be executed."
-                       message=""
-                       log_failure_msg
-               fi
-       )
+       /etc/init.d/networking/ifup ${file}
 done