]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Funktionen eingebaut, damit bei green only die Gateway und DNS Einstellungen wirksam...
authormaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Fri, 25 May 2007 18:32:07 +0000 (18:32 +0000)
committermaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Fri, 25 May 2007 18:32:07 +0000 (18:32 +0000)
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@580 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

src/initscripts/init.d/net/common/ipv4-static
src/initscripts/init.d/net/ifup

index 2c8aec13865e6254f6bfc7c498e3f2126be98e70..5c9408759f114d38437059ec39b947e81f2bf8eb 100644 (file)
@@ -7,6 +7,7 @@
 # Authors     : Nathan Coulson - nathan@linuxfromscratch.org
 #               Kevin P. Fleming - kpfleming@linuxfromscratch.org
 #               Michael Tremer - mitch@ipfire.org
+#               Maniacikarus - Maniacikarus@ipfire.org
 #
 # Version     : 00.00
 #
@@ -43,6 +44,17 @@ case "${2}" in
                        if ip route | grep -q default; then
                                boot_mesg "Gateway already setup; skipping." ${WARNING}
                                echo_warning
+                       elif [ "${CONFIG_TYPE}" == "0" ] || [ "${CONFIG_TYPE}" == "" ] && [ "${GATEWAY}" != "" ]; then
+                               boot_mesg "Setting up default gateway for green only..."
+                               ip route add default via ${GATEWAY} dev ${1}
+                               evaluate_retval
+                                if [ "${DNS1}" != "" ];then
+                               boot_mesg "Registering DNS Server for green only..."
+                               echo "nameserver $DNS1" > /etc/resolv.conf
+                                fi
+                                if [ "${DNS2}" != "" ];then
+                                 echo "nameserver $DNS2" >> /etc/resolv.conf
+                                fi
                        else
                                boot_mesg "Setting up default gateway..."
                                echo $DEFAULT_GATEWAY > /var/ipfire/red/remote-ipaddress
index 252fd0f121151de6df363d0d1013ea43c1950e54..eca4360a6834212d05f3795c4d95411d6c4e7678 100644 (file)
@@ -7,6 +7,7 @@
 # Authors     : Nathan Coulson - nathan@linuxfromscratch.org
 #               Kevin P. Fleming - kpfleming@linuxfromscratch.org
 #               Michael Tremer - mitch@ipfire.org
+#               Maniacikarus - Maniacikarus@ipfire.org
 #
 # Version     : 01.00
 #
@@ -51,9 +52,16 @@ boot_mesg_flush
 
        # Passing the variables to the script
        if [ "$name" == "green" ]; then
-               NAME=${name} ADDRESS=${GREEN_ADDRESS} NETMASK=${GREEN_NETMASK} \
+        if [ "${CONFIG_TYPE}" == "0" ] || [ "${CONFIG_TYPE}" == "" ]; then
+         NAME=${name} ADDRESS=${GREEN_ADDRESS} NETMASK=${GREEN_NETMASK} \
                NETADDRESS=${GREEN_NETADDRESS} BROADCAST=${GREEN_BROADCAST} \
+               DNS1=${DNS1} DNS2=${DNS2} GATEWAY=${DEFAULT_GATEWAY} \
                /etc/rc.d/init.d/net/common/ipv4-static ${GREEN_DEV} up
+        else
+       NAME=${name} ADDRESS=${GREEN_ADDRESS} NETMASK=${GREEN_NETMASK} \
+               NETADDRESS=${GREEN_NETADDRESS} BROADCAST=${GREEN_BROADCAST} \
+               /etc/rc.d/init.d/net/common/ipv4-static ${GREEN_DEV} up
+        fi
                
        elif [ "$name" == "blue" ]; then
                NAME=${name} ADDRESS=${BLUE_ADDRESS} NETMASK=${BLUE_NETMASK} \