]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Only auto background with no interfaces.
authorRoy Marples <roy@marples.name>
Wed, 18 Feb 2009 08:07:10 +0000 (08:07 +0000)
committerRoy Marples <roy@marples.name>
Wed, 18 Feb 2009 08:07:10 +0000 (08:07 +0000)
dhcpcd.8.in
dhcpcd.c

index c2494fa7bd8c70368613cacd1b8f965991cf49e7..395a0b2aeab6c65f7b3f2394b71236036ce58af3 100644 (file)
@@ -114,7 +114,7 @@ If a list of interfaces are given on the command line, then
 only works with those interfaces, otherwise
 .Nm
 discovers available interfaces.
-If link management is enabled and none or more than one interfaces are given,
+If link management is enabled and no interfaces are given on the command line,
 .Nm
 forks to the background right away.
 .Pp
index ec2752661cabfc0cbe94da7664009320c3feab8e..0db9ee638425ffd68ebb50628d30e914b7bae031 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -1460,10 +1460,8 @@ main(int argc, char **argv)
 
        ifc = argc - optind;
        ifv = argv + optind;
-       if (ifc != 1) {
-               if (options & (DHCPCD_LINK | DHCPCD_DAEMONISE))
-                       daemonise();
-       }
+       if (ifc == 0 && options & (DHCPCD_LINK | DHCPCD_DAEMONISE))
+               daemonise();
 
        ifaces = discover_interfaces(ifc, ifv);
        for (i = 0; i < ifc; i++) {