summaryrefslogtreecommitdiffstats
path: root/defaultenv-2/base/bin/ifup
diff options
context:
space:
mode:
Diffstat (limited to 'defaultenv-2/base/bin/ifup')
-rw-r--r--defaultenv-2/base/bin/ifup12
1 files changed, 10 insertions, 2 deletions
diff --git a/defaultenv-2/base/bin/ifup b/defaultenv-2/base/bin/ifup
index 9f6fd6b..37b986c 100644
--- a/defaultenv-2/base/bin/ifup
+++ b/defaultenv-2/base/bin/ifup
@@ -51,9 +51,17 @@ if [ "$ip" = static ]; then
${interface}.netmask=$netmask
${interface}.serverip=$serverip
${interface}.gateway=$gateway
+ ret=0
elif [ "$ip" = dhcp ]; then
dhcp
- exit $?
+ ret=$?
+ if [ $ret = 0 -a -n "$serverip" ]; then
+ ${interface}.serverip=$serverip
+ fi
+fi
+
+if [ $ret = 0 ]; then
+ echo -o /tmp/network/$interface up
fi
-echo -o /tmp/network/$interface up
+exit $ret