diff options
| author | Roy Marples <roy@marples.name> | 2008-11-15 11:24:26 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-11-15 11:24:26 +0000 |
| commit | 7b9d0731c3ac128498c7110f1e1f1e8d0868c820 (patch) | |
| tree | 12b0381ec5b0db28ca92fc0b63adb6032b027786 /dhcpcd.c | |
| parent | e6be43482df2b919a1c6f15e95d83708c110382d (diff) | |
| download | dhcpcd-7b9d0731c3ac128498c7110f1e1f1e8d0868c820.tar.xz | |
Fork into background even with no interfaces IF we are asked to background AND have link detection.
Diffstat (limited to 'dhcpcd.c')
| -rw-r--r-- | dhcpcd.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1312,12 +1312,19 @@ main(int argc, char **argv) if (strcmp(iface->name, ifv[i]) == 0) break; if (!iface) - syslog(LOG_ERR, "%s: invalid interface", ifv[i]); + syslog(LOG_ERR, "%s: interface not found or invalid", + ifv[i]); } if (!ifaces) { if (ifc == 0) syslog(LOG_ERR, "no valid interfaces found"); - exit(EXIT_FAILURE); + if (!(options & DHCPCD_BACKGROUND) || + !(options & DHCPCD_LINK)) + { + syslog(LOG_ERR, "aborting as we're not backgrounding" + " with link detection"); + exit(EXIT_FAILURE); + } } if (options & DHCPCD_BACKGROUND) |
