Sync udhcpc script from RescueOS v1.1

When using the script from this repo, 'udhcpc -i wlan0' would error out
with this:

> Recreating /etc/resolv.conf
> /usr/share/udhcpc/default.script: line 37: /etc/resolv.conf-8352: Read-only file system
>  Adding DNS server 192.168.7.1
> /usr/share/udhcpc/default.script: line 41: /etc/resolv.conf-8352: Read-only file system
> mv: can't rename '/etc/resolv.conf-8352': No such file or directory
Cette révision appartient à :
Daniel Gnoutcheff 2015-03-30 14:54:05 -04:00
Parent 8f1eabb7c9
révision 9f262fde9d

Voir le fichier

@ -33,14 +33,12 @@ case "$1" in
done done
fi fi
echo "Recreating $RESOLV_CONF" echo "Setting $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 for i in $dns ; do
echo " Adding DNS server $i" echo " Adding DNS server $i"
echo "nameserver $i" >> $RESOLV_CONF-$$ echo "nameserver $i" >> $RESOLV_CONF
done done
mv $RESOLV_CONF-$$ $RESOLV_CONF
;; ;;
esac esac