diff options
| author | Roy Marples <roy@marples.name> | 2013-08-31 16:48:39 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2013-08-31 16:48:39 +0000 |
| commit | 7013b07382b7a2aa63115d75fc6724bedf199a9c (patch) | |
| tree | a3329f8d274112f66bf5d1ba7cdb0f4dc0f251d4 /dhcpcd.c | |
| parent | a544b76a69516341f1134f2dd04d8dcde1ff0868 (diff) | |
| download | dhcpcd-7013b07382b7a2aa63115d75fc6724bedf199a9c.tar.xz | |
Add 4 and 6 arguments to the waitip command so that you can specify
which protocols to wait for.
Diffstat (limited to 'dhcpcd.c')
| -rw-r--r-- | dhcpcd.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -206,6 +206,23 @@ daemonise(void) char buf = '\0'; int sidpipe[2], fd; + if (options & DHCPCD_DAEMONISE && !(options & DHCPCD_DAEMONISED)) { + if (options & DHCPCD_WAITIP4 && + !ipv4_addrexists(NULL)) + return -1; + if (options & DHCPCD_WAITIP6 && + !ipv6nd_addrexists(NULL) && + !dhcp6_addrexists(NULL)) + return -1; + if ((options & + (DHCPCD_WAITIP | DHCPCD_WAITIP4 | DHCPCD_WAITIP6)) == + DHCPCD_WAITIP && + !ipv4_addrexists(NULL) && + !ipv6nd_addrexists(NULL) && + !dhcp6_addrexists(NULL)) + return -1; + } + eloop_timeout_delete(handle_exit_timeout, NULL); if (options & DHCPCD_DAEMONISED || !(options & DHCPCD_DAEMONISE)) return 0; |
