dhclient - Use -q option instead of redirection.
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>
Sat, 3 Dec 2011 21:08:40 +0000 (22:08 +0100)
committerAntonio Huete Jimenez <tuxillo@quantumachine.net>
Sat, 3 Dec 2011 21:09:16 +0000 (22:09 +0100)
Obtained-from: OpenBSD

sbin/dhclient/dhclient-script

index ff79f2f..dde2f84 100644 (file)
@@ -70,11 +70,11 @@ delete_old_routes() {
 
 add_new_routes() {
        for router in $new_routers; do
-               route delete default >/dev/null 2>&1
+               route -q delete default
                if [ "$new_ip_address" = "$router" ]; then
-                       route add default -iface $router >/dev/null 2>&1
+                       route -q add default -iface $router
                else
-                       route add default $router >/dev/null 2>&1
+                       route -q add default $router
                fi
                # 2nd and subsequent default routers error out, so explicitly
                # stop processing the list after the first one.