From 621b327e2ce208f4ac6f8edd781ff2be2aa0b3ec Mon Sep 17 00:00:00 2001 From: maniacikarus Date: Sat, 9 Jun 2007 10:02:53 +0000 Subject: [PATCH] Red active wurde nur bei pptp erstellt -> gefixt dhcp bei ipup und ifdown eingefuegt git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@619 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- src/initscripts/init.d/net/ifdown | 15 +++++++++++++++ src/initscripts/init.d/net/ifup | 16 ++++++++++++++++ src/initscripts/init.d/net/red/update | 4 ---- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/initscripts/init.d/net/ifdown b/src/initscripts/init.d/net/ifdown index 6b31c74d42..4440480e89 100644 --- a/src/initscripts/init.d/net/ifdown +++ b/src/initscripts/init.d/net/ifdown @@ -35,15 +35,30 @@ then NETADDRESS=${GREEN_NETADDRESS} BROADCAST=${GREEN_BROADCAST} \ /etc/rc.d/init.d/net/common/ipv4-static ${GREEN_DEV} down + if [ "${ENABLE_GREEN}" == "on" ]; then + boot_mesg "Bringing up dhcpd on device ${DEVICE}." + /etc/rc.d/init.d/net/common/dhcpd ${GREEN_DEV} down + fi + elif [ "$name" == "blue" ]; then NAME=${name} ADDRESS=${BLUE_ADDRESS} NETMASK=${BLUE_NETMASK}\ NETADDRESS=${BLUE_NETADDRESS} BROADCAST=${BLUE_BROADCAST} \ /etc/rc.d/init.d/net/common/ipv4-static ${BLUE_DEV} down + if [ "${ENABLE_BLUE}" == "on" ]; then + boot_mesg "Bringing up dhcpd on device ${DEVICE}." + /etc/rc.d/init.d/net/common/dhcpd ${BLUE_DEV} down + fi + elif [ "$name" == "orange" ]; then NAME=${name} ADDRESS=${ORANGE_ADDRESS} NETMASK=${ORANGE_NETMASK}\ NETADDRESS=${ORANGE_NETADDRESS} BROADCAST=${ORANGE_BROADCAST} \ /etc/rc.d/init.d/net/common/ipv4-static ${ORANGE_DEV} down + + if [ "${ENABLE_ORANGE}" == "on" ]; then + boot_mesg "Bringing up dhcpd on device ${DEVICE}." + /etc/rc.d/init.d/net/common/dhcpd ${ORANGE_DEV} down + fi elif [ "$name" == "red" ]; then if [ "${RED_TYPE}" == "PPPOE" ]; then diff --git a/src/initscripts/init.d/net/ifup b/src/initscripts/init.d/net/ifup index eca4360a68..3866a04d79 100644 --- a/src/initscripts/init.d/net/ifup +++ b/src/initscripts/init.d/net/ifup @@ -24,6 +24,7 @@ boot_mesg_flush ( eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings) + eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings) if [ "$name" == "green" ]; then DEVICE="${GREEN_DEV}" @@ -62,17 +63,32 @@ boot_mesg_flush NETADDRESS=${GREEN_NETADDRESS} BROADCAST=${GREEN_BROADCAST} \ /etc/rc.d/init.d/net/common/ipv4-static ${GREEN_DEV} up fi + + if [ "${ENABLE_GREEN}" == "on" ]; then + boot_mesg "Bringing up dhcpd on device ${DEVICE}." + /etc/rc.d/init.d/net/common/dhcpd ${GREEN_DEV} up + fi elif [ "$name" == "blue" ]; then NAME=${name} ADDRESS=${BLUE_ADDRESS} NETMASK=${BLUE_NETMASK} \ NETADDRESS=${BLUE_NETADDRESS} BROADCAST=${BLUE_BROADCAST} \ /etc/rc.d/init.d/net/common/ipv4-static ${BLUE_DEV} up + if [ "${ENABLE_BLUE}" == "on" ]; then + boot_mesg "Bringing up dhcpd on device ${DEVICE}." + /etc/rc.d/init.d/net/common/dhcpd ${BLUE_DEV} up + fi + elif [ "$name" == "orange" ]; then NAME=${name} ADDRESS=${ORANGE_ADDRESS} NETMASK=${ORANGE_NETMASK} \ NETADDRESS=${ORANGE_NETADDRESS} BROADCAST=${ORANGE_BROADCAST} \ /etc/rc.d/init.d/net/common/ipv4-static ${ORANGE_DEV} up + if [ "${ENABLE_ORANGE}" == "on" ]; then + boot_mesg "Bringing up dhcpd on device ${DEVICE}." + /etc/rc.d/init.d/net/common/dhcpd ${ORANGE_DEV} up + fi + elif [ "$name" == "red" ]; then if [ "${RED_TYPE}" == "PPPOE" ]; then NAME=${name} /etc/rc.d/init.d/net/red/pppoe ${RED_DEV} up diff --git a/src/initscripts/init.d/net/red/update b/src/initscripts/init.d/net/red/update index 7c06c3df14..2bb411f9c2 100644 --- a/src/initscripts/init.d/net/red/update +++ b/src/initscripts/init.d/net/red/update @@ -70,9 +70,7 @@ if ( echo $0 | /bin/grep -q 'dhcpcd.exe' ); then case "$2" in up) logger -p local0.info -t dhcpcd.exe[$$] "${INTERFACE} has been configured with old IP=${IPADDR}" - if [ "$RED_TYPE" != 'PPTP' ]; then touch /var/ipfire/red/active - fi ;; new) logger -p local0.info -t dhcpcd.exe[$$] "${INTERFACE} has been configured with new IP=${IPADDR}" @@ -87,9 +85,7 @@ if ( echo $0 | /bin/grep -q 'dhcpcd.exe' ); then logger -p local0.info -t red[$$] "unlocking from $$" exit 0 else - if [ "$RED_TYPE" != 'PPTP' ]; then touch /var/ipfire/red/active - fi fi ;; down) -- 2.39.5