Mercurial > hg > dhcpcd
diff src/if-options.c @ 5535:a0d828e25482 draft
Add --noconfigure option
With this set dhcpcd will not configure anything on the host.
The expectation is that a 3rd party script will instead.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Wed, 04 Nov 2020 14:18:48 +0000 |
| parents | e6620d8e18bb |
| children | 08426e8a98a7 |
line wrap: on
line diff
--- a/src/if-options.c Wed Nov 04 11:31:40 2020 +1300 +++ b/src/if-options.c Wed Nov 04 14:18:48 2020 +0000 @@ -165,6 +165,8 @@ {"inactive", no_argument, NULL, O_INACTIVE}, {"mudurl", required_argument, NULL, O_MUDURL}, {"link_rcvbuf", required_argument, NULL, O_LINK_RCVBUF}, + {"configure", no_argument, NULL, O_CONFIGURE}, + {"noconfigure", no_argument, NULL, O_NOCONFIGURE}, {NULL, 0, NULL, '\0'} }; @@ -2244,6 +2246,12 @@ } #endif break; + case O_CONFIGURE: + ifo->options |= DHCPCD_CONFIGURE; + break; + case O_NOCONFIGURE: + ifo->options &= ~DHCPCD_CONFIGURE; + break; default: return 0; } @@ -2363,7 +2371,8 @@ if ((ifo = default_config(ctx)) == NULL) return NULL; if (default_options == 0) { - default_options |= DHCPCD_DAEMONISE | DHCPCD_GATEWAY; + default_options |= DHCPCD_DAEMONISE | + DHCPCD_CONFIGURE | DHCPCD_GATEWAY; #ifdef INET skip = socket(PF_INET, SOCK_DGRAM, 0); if (skip != -1) {
