diff options
author | Denis Vlasenko | 2009-04-21 00:17:00 +0000 |
---|---|---|
committer | Denis Vlasenko | 2009-04-21 00:17:00 +0000 |
commit | 1b47bbdfa485aa7361c44718ddb29ba75a9cfe7b (patch) | |
tree | cd207da09ad35679db647fe60bf0f4ec5e44318d /examples | |
parent | ad4bd0548a5a9b630606ca95794cee8b31671c9a (diff) | |
download | busybox-1b47bbdfa485aa7361c44718ddb29ba75a9cfe7b.zip busybox-1b47bbdfa485aa7361c44718ddb29ba75a9cfe7b.tar.gz |
tweak example udhcp script
Diffstat (limited to 'examples')
-rw-r--r-- | examples/udhcp/simple.script | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/udhcp/simple.script b/examples/udhcp/simple.script index ae09316..abf1b6f 100644 --- a/examples/udhcp/simple.script +++ b/examples/udhcp/simple.script @@ -1,10 +1,10 @@ #!/bin/sh - # udhcpc script edited by Tim Riker <Tim@Rikers.org> -[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 - RESOLV_CONF="/etc/resolv.conf" + +[ -n "$1" ] || echo "Error: should be called from udhcpc" && exit 1 + NETMASK="" [ -n "$subnet" ] && NETMASK="netmask $subnet" BROADCAST="broadcast +" @@ -35,10 +35,10 @@ case "$1" in echo "Recreating $RESOLV_CONF" echo -n > $RESOLV_CONF-$$ - [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF-$$ + [ -n "$domain" ] && echo "search $domain" >> $RESOLV_CONF-$$ for i in $dns ; do echo " Adding DNS server $i" - echo nameserver $i >> $RESOLV_CONF-$$ + echo "nameserver $i" >> $RESOLV_CONF-$$ done mv $RESOLV_CONF-$$ $RESOLV_CONF ;; |