case 'n':
sig = SIGALRM;
break;
+ case 'q':
+ setloglevel(LOG_WARNING);
+ options |= DHCPCD_QUIET;
+ break;
case 'x':
sig = SIGTERM;
break;
exit(EXIT_FAILURE);
}
} else {
- if (errno != EEXIST)
+ if (errno != ENOENT)
logger(LOG_ERR, "open_control: %m");
}
}
case 'd': /* FALLTHROUGH */
case 'k': /* FALLTHROUGH */
case 'n': /* FALLTHROUGH */
+ case 'q': /* FALLTHROUGH */
case 'x': /* FALLTHROUGH */
case 'B': /* FALLTHROUGH */
case 'T': /* We need to handle non interface options */
case 'p':
ifo->options |= DHCPCD_PERSISTENT;
break;
- case 'q':
- setloglevel(LOG_WARNING);
- break;
case 's':
ifo->options |= DHCPCD_INFORM;
ifo->options |= DHCPCD_PERSISTENT;
#define DHCPCD_HOSTNAME (1 << 18)
#define DHCPCD_CLIENTID (1 << 19)
#define DHCPCD_LINK (1 << 20)
-#define DHCPCD_BACKGROUND (1 << 21)
+#define DHCPCD_QUIET (1 << 21)
+#define DHCPCD_BACKGROUND (1 << 22)
extern const struct option cf_options[];
iface->hwlen = INFINIBAND_ADDR_LEN;
break;
default:
- logger(LOG_ERR, "%s: unsupported media family", iface->name);
+ /* Don't needlessly spam console on startup */
+ if (!(options & DHCPCD_MASTER &&
+ !(options & DHCPCD_DAEMONISED) &&
+ options & DHCPCD_QUIET))
+ logger(LOG_ERR, "%s: unsupported media family", iface->name);
goto eexit;
}
memcpy(iface->hwaddr, ifr.ifr_hwaddr.sa_data, iface->hwlen);