From: Denis Vlasenko Date: Tue, 21 Apr 2009 00:17:00 +0000 (-0000) Subject: tweak example udhcp script X-Git-Tag: 1_15_0~303 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1b47bbdfa485aa7361c44718ddb29ba75a9cfe7b;p=oweals%2Fbusybox.git tweak example udhcp script --- diff --git a/examples/udhcp/simple.script b/examples/udhcp/simple.script index ae0931640..abf1b6f26 100644 --- a/examples/udhcp/simple.script +++ b/examples/udhcp/simple.script @@ -1,10 +1,10 @@ #!/bin/sh - # udhcpc script edited by Tim Riker -[ -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 ;;