fix error messages

SVN-Revision: 2996
This commit is contained in:
Mike Baker 2006-01-16 19:16:20 +00:00
parent cee6b526ff
commit 1f59f207c4
2 changed files with 3 additions and 7 deletions

View File

@ -75,12 +75,7 @@ do_ifup() {
DHCP_HOSTNAME=${DHCP_HOSTNAME%%.*} DHCP_HOSTNAME=${DHCP_HOSTNAME%%.*}
[ -z $DHCP_HOSTNAME ] || DHCP_ARGS="$DHCP_ARGS -H $DHCP_HOSTNAME" [ -z $DHCP_HOSTNAME ] || DHCP_ARGS="$DHCP_ARGS -H $DHCP_HOSTNAME"
[ "$if_proto" = "pptp" ] && DHCP_ARGS="$DHCP_ARGS -n -q" || DHCP_ARGS="$DHCP_ARGS -R &" [ "$if_proto" = "pptp" ] && DHCP_ARGS="$DHCP_ARGS -n -q" || DHCP_ARGS="$DHCP_ARGS -R &"
oldpid=$(cat $pidfile)
${DEBUG:-eval} "udhcpc $DHCP_ARGS" ${DEBUG:-eval} "udhcpc $DHCP_ARGS"
pidof udhcpc | grep "$oldpid" >&- 2>&- && {
sleep 1
kill -9 $oldpid
}
# hotplug events are handled by /usr/share/udhcpc/default.script # hotplug events are handled by /usr/share/udhcpc/default.script
;; ;;
*) *)

View File

@ -28,8 +28,9 @@ case "$1" in
if [ -n "$router" ] ; then if [ -n "$router" ] ; then
if [ "$router" != "$(route -n | grep '^0.0.0.0' | grep $interface | awk '{ print $2 }')" ] ; then if [ "$router" != "$(route -n | grep '^0.0.0.0' | grep $interface | awk '{ print $2 }')" ] ; then
echo "deleting routers" while route del default gw 0.0.0.0 dev $interface 2>&- ; do
while route del default gw 0.0.0.0 dev $interface ; do :; done echo "removing old default route"
done
for i in $router ; do for i in $router ; do
route add default gw $i dev $interface route add default gw $i dev $interface
done done