This only a cosmetic change but should making the code easier changeable later on. Signed-off-by: Jonatan Schlag --- src/initscripts/system/network | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/initscripts/system/network b/src/initscripts/system/network index 0dcce060f..f334561de 100644 --- a/src/initscripts/system/network +++ b/src/initscripts/system/network @@ -21,6 +21,8 @@ . /etc/sysconfig/rc . ${rc_functions} +. /etc/init.d/networking/functions.network + eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings) DO="${1}" @@ -54,11 +56,11 @@ case "${DO}" in [ "$green" == "1" ] && /etc/rc.d/init.d/networking/green start # BLUE - [ "$blue" == "1" ] && [ "$CONFIG_TYPE" = "3" -o "$CONFIG_TYPE" = "4" ] && \ + [ "$blue" == "1" ] && network_zone_exists "blue" && \ /etc/rc.d/init.d/networking/blue start # ORANGE - [ "$orange" == "1" ] && [ "$CONFIG_TYPE" = "2" -o "$CONFIG_TYPE" = "4" ] && \ + [ "$orange" == "1" ] && network_zone_exists "orange" && \ /etc/rc.d/init.d/networking/orange start # RED @@ -84,16 +86,16 @@ case "${DO}" in [ "$green" == "1" ] && /etc/rc.d/init.d/networking/green stop # BLUE - [ "$blue" == "1" ] && [ "$CONFIG_TYPE" = "3" -o "$CONFIG_TYPE" = "4" ] && \ + [ "$blue" == "1" ] && network_zone_exists "blue" && \ /etc/rc.d/init.d/networking/blue stop # ORANGE - [ "$orange" == "1" ] && [ "$CONFIG_TYPE" = "2" -o "$CONFIG_TYPE" = "4" ] && \ + [ "$orange" == "1" ] && network_zone_exists "orange" && \ /etc/rc.d/init.d/networking/orange stop # RED if [ "$red" == "1" ]; then - if [ "$CONFIG_TYPE" = "1" -o "$CONFIG_TYPE" = "2" -o "$CONFIG_TYPE" = "3" -o "$CONFIG_TYPE" = "4" ]; then + if network_zone_exists "red"; then /etc/rc.d/init.d/networking/red stop fi fi -- 2.39.2