]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
CGI fuer DHCP gefixt und if Skripte zurueckgesetzt
authormaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sun, 10 Jun 2007 12:17:52 +0000 (12:17 +0000)
committermaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sun, 10 Jun 2007 12:17:52 +0000 (12:17 +0000)
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@622 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

html/cgi-bin/dhcp.cgi
src/initscripts/init.d/net/ifdown
src/initscripts/init.d/net/ifup

index 1ccaa400310bbd3325e0e8e1cb263686ef003909..e24f7336d8f00b004de074cfd468c4e1aed49887 100644 (file)
@@ -49,7 +49,8 @@ my @nosaved=();
 our $OptionTypes = 'boolean|((un)?signed )?integer (8|16|32)|ip-address|text|string|encapsulate \w+|array of ip-address';
 
 &Header::showhttpheaders();
-our @ITFs=('GREEN','BLUE');
+our @ITFs=('GREEN');
+if (&Header::blue_used()){push(@ITFs,'BLUE');}
 
 #Settings1 for the first screen box
 foreach my $itf (@ITFs) {
index 4440480e89aef0925e966e21b480001a42697ab5..039281c6f6e2085742c164d0cdeb38e444462a45 100644 (file)
@@ -35,31 +35,16 @@ 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
                        NAME=${name} /etc/rc.d/init.d/net/red/pppoe ${RED_DEV} down
index 3866a04d79bc16d220d49107d052e715f8dab181..d565fcf374af1679ae9302c6908e74af4da3b79e 100644 (file)
@@ -24,7 +24,6 @@ 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}"
@@ -64,31 +63,16 @@ boot_mesg_flush
                /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