Project "Tuxbox-GIT: cdk": The branch, master has been updated via c5ac465d346eba22f3797977d8a8e7786c7978c1 (commit) from a8a90d223c4fb9411c4058e52b092c31e3d437a0 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c5ac465d346eba22f3797977d8a8e7786c7978c1 Author: GetAway <get-a...@t-online.de> Date: Sun Jul 13 14:34:24 2014 +0200 network: update udhcpc default.script for current busybox Signed-off-by: GetAway <get-a...@t-online.de> Signed-off-by: Thilo Graf <d...@novatux.de> diff --git a/config/busybox.config.m4 b/config/busybox.config.m4 index b698dbe..483c026 100644 --- a/config/busybox.config.m4 +++ b/config/busybox.config.m4 @@ -237,8 +237,8 @@ option(`CONFIG_OD', `n', `n') option(`CONFIG_PRINTENV', `n', `n') option(`CONFIG_PRINTF', `n', `n') option(`CONFIG_PWD', `y', `n') -# CONFIG_READLINK is not set -# CONFIG_FEATURE_READLINK_FOLLOW is not set +option(`CONFIG_READLINK', `y', `y') +option(`CONFIG_FEATURE_READLINK_FOLLOW', `y', `y') option(`CONFIG_REALPATH', `n', `n') option(`CONFIG_RM', `y', `y') option(`CONFIG_RMDIR', `y', `y') diff --git a/root/share/udhcpc/default.script b/root/share/udhcpc/default.script index 6db8cf6..3b58dbf 100755 --- a/root/share/udhcpc/default.script +++ b/root/share/udhcpc/default.script @@ -1,37 +1,52 @@ #!/bin/sh - -[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 +# udhcpc script edited by Tim Riker <t...@rikers.org> RESOLV_CONF="/etc/resolv.conf" +[ -n "$1" ] || { echo "Error: should be called from udhcpc"; exit 1; } + +NETMASK="" +[ -n "$subnet" ] && NETMASK="netmask $subnet" +BROADCAST="broadcast +" +[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" + case "$1" in deconfig) - /bin/ip link set $interface up + echo "Setting IP address 0.0.0.0 on $interface" + ifconfig $interface 0.0.0.0 ;; renew|bound) - /bin/ip addr add $ip/$mask dev $interface + echo "Setting IP address $ip on $interface" + ifconfig $interface $ip $NETMASK $BROADCAST if [ -n "$router" ] ; then - for i in $router ; do - /bin/ip route add default via $i dev $interface + echo "Deleting routers" + while route del default gw 0.0.0.0 dev $interface ; do + : done - fi - if [ -n "$hostname" ]; then - hostname $hostname + metric=0 + for i in $router ; do + echo "Adding router $i" + route add default gw $i dev $interface metric $metric + : metric=`expr $metric+1` + done fi - echo "# Generated by udhcpc" > $RESOLV_CONF - echo "" >> $RESOLV_CONF - if [ -n "$domain" ] ; then - echo search $domain >> $RESOLV_CONF - fi + echo "Recreating $RESOLV_CONF" + # If the file is a symlink somewhere (like /etc/resolv.conf + # pointing to /run/resolv.conf), make sure things work. + realconf=$(readlink -f "$RESOLV_CONF" 2>/dev/null || echo "$RESOLV_CONF") + tmpfile="/tmp/resolv.conf-$$" + > "$tmpfile" + [ -n "$domain" ] && echo "search $domain" >> "$tmpfile" for i in $dns ; do - echo nameserver $i >> $RESOLV_CONF + echo " Adding DNS server $i" + echo "nameserver $i" >> "$tmpfile" done + mv "$tmpfile" "$realconf" ;; esac exit 0 - ----------------------------------------------------------------------- Summary of changes: config/busybox.config.m4 | 4 +- root/share/udhcpc/default.script | 47 +++++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 18 deletions(-) -- Tuxbox-GIT: cdk ------------------------------------------------------------------------------ _______________________________________________ Tuxbox-cvs-commits mailing list Tuxbox-cvs-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tuxbox-cvs-commits