Dont use xargs
authorGlenn L McGrath <bug1@ihug.co.nz>
Tue, 19 Nov 2002 09:58:56 +0000 (09:58 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Tue, 19 Nov 2002 09:58:56 +0000 (09:58 -0000)
networking/ifupdown.c

index b0f526770071683d082b726b06540737fdb4df67..e4bfc3eb4faa48d4fafe9adc837fd99481c34aa0 100644 (file)
@@ -460,7 +460,7 @@ static int dhcp_up(interface_defn *ifd, execfn *exec)
 static int dhcp_down(interface_defn *ifd, execfn *exec)
 {
        if (execable("/sbin/dhclient")) {
-               if (!execute("cat /var/run/dhclient.%iface%.pid | xargs kill", ifd, exec)) {
+               if (!execute("kill -9 `cat /var/run/udhcpc.%iface%.pid`", ifd, exec)) {
                        return(0);
                }
        } else if (execable("/sbin/pump")) {
@@ -468,7 +468,7 @@ static int dhcp_down(interface_defn *ifd, execfn *exec)
                        return(0);
                }
        } else if (execable("/sbin/udhcpc")) {
-               if (!execute("cat /var/run/udhcpc.%iface%.pid | xargs kill", ifd, exec)) {
+               if (!execute("kill -9 `cat /var/run/udhcpc.%iface%.pid`", ifd, exec)) {
                        return(0);
                }
        } else if (execable("/sbin/dhcpcd")) {