From: Roy Marples Date: Wed, 18 Feb 2009 08:07:10 +0000 (+0000) Subject: Only auto background with no interfaces. X-Git-Tag: v5.0.0~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d775a6758c247e2ab22e8c7f9252e818217736e;p=thirdparty%2Fdhcpcd.git Only auto background with no interfaces. --- diff --git a/dhcpcd.8.in b/dhcpcd.8.in index c2494fa7..395a0b2a 100644 --- a/dhcpcd.8.in +++ b/dhcpcd.8.in @@ -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 diff --git a/dhcpcd.c b/dhcpcd.c index ec275266..0db9ee63 100644 --- 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++) {