Revert "busybox-udhcpc simple.script: whitespace."

This reverts commit ea8c1346e5,
to facilitate diffing.
This commit is contained in:
Neels Hofmeyr 2015-07-23 15:55:35 +02:00
parent 8e46fae730
commit bfac671c1c
1 changed files with 28 additions and 30 deletions

View File

@ -31,46 +31,46 @@ case "$1" in
/sbin/resolvconf -d "${interface}.udhcpc" /sbin/resolvconf -d "${interface}.udhcpc"
fi fi
if ! root_is_nfs ; then if ! root_is_nfs ; then
if [ $have_bin_ip -eq 1 ]; then if [ $have_bin_ip -eq 1 ]; then
ip addr flush dev $interface ip addr flush dev $interface
ip link set dev $interface up ip link set dev $interface up
else else
/sbin/ifconfig $interface 0.0.0.0 /sbin/ifconfig $interface 0.0.0.0
fi fi
fi fi
;; ;;
renew|bound) renew|bound)
if [ $have_bin_ip -eq 1 ]; then if [ $have_bin_ip -eq 1 ]; then
ip addr add dev $interface local $ip/$mask $BROADCAST ip addr add dev $interface local $ip/$mask $BROADCAST
else else
/sbin/ifconfig $interface $ip $BROADCAST $NETMASK /sbin/ifconfig $interface $ip $BROADCAST $NETMASK
fi fi
if [ -n "$router" -a "$INSTALL_DEFAULT_ROUTE" != "no" ] ; then if [ -n "$router" -a "$INSTALL_DEFAULT_ROUTE" != "no" ] ; then
if ! root_is_nfs ; then if ! root_is_nfs ; then
if [ $have_bin_ip -eq 1 ]; then if [ $have_bin_ip -eq 1 ]; then
while ip route del default dev $interface 2>/dev/null ; do while ip route del default dev $interface 2>/dev/null ; do
: :
done done
else else
while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do
: :
done done
fi fi
fi fi
metric=10 metric=10
for i in $router ; do for i in $router ; do
if [ $have_bin_ip -eq 1 ]; then if [ $have_bin_ip -eq 1 ]; then
ip route add default via $i metric $metric ip route add default via $i metric $metric
else else
route add default gw $i dev $interface metric $metric 2>/dev/null route add default gw $i dev $interface metric $metric 2>/dev/null
fi fi
metric=$(($metric + 1)) metric=$(($metric + 1))
done done
fi fi
if [ "$STATIC_DNS" != "yes" ]; then if [ "$STATIC_DNS" != "yes" ]; then
# Update resolver configuration file # Update resolver configuration file
R="" R=""
[ -n "$domain" ] && R="domain $domain [ -n "$domain" ] && R="domain $domain
@ -86,10 +86,8 @@ case "$1" in
else else
echo -n "$R" > "$RESOLV_CONF" echo -n "$R" > "$RESOLV_CONF"
fi fi
fi fi
;; ;;
esac esac
exit 0 exit 0
# vim: tabstop=8 shiftwidth=8 noexpandtab