while ((opt = getopt_long(argc, argv, IF_OPTS, cf_options, &oi)) != -1)
{
switch (opt) {
- case 'd':
- setlogmask(LOG_UPTO(LOG_DEBUG));
- break;
case 'f':
cffile = optarg;
break;
options &= ~DHCPCD_DAEMONISE;
#endif
- if (options & DHCPCD_QUIET)
+ if (options & DHCPCD_DEBUG)
+ setlogmask(LOG_UPTO(LOG_DEBUG));
+ else if (options & DHCPCD_QUIET)
setlogmask(LOG_UPTO(LOG_WARNING));
/* If we have any other args, we should run as a single dhcpcd instance
struct rt *rt;
switch(opt) {
- case 'd': /* FALLTHROUGH */
case 'n': /* FALLTHROUGH */
case 'x': /* FALLTHROUGH */
case 'T': /* We need to handle non interface options */
case 'c':
strlcpy(ifo->script, arg, sizeof(ifo->script));
break;
+ case 'd':
+ ifo->options |= DHCPCD_DEBUG;
+ break;
case 'h':
if (arg) {
s = parse_string(ifo->hostname,
#define DHCPCD_DOMAIN (1 << 2)
#define DHCPCD_GATEWAY (1 << 3)
#define DHCPCD_STATIC (1 << 4)
+#define DHCPCD_DEBUG (1 << 5)
#define DHCPCD_LASTLEASE (1 << 7)
#define DHCPCD_INFORM (1 << 8)
#define DHCPCD_REQUEST (1 << 9)