Signed-off-by: John Crispin <blogic@openwrt.org>
spawn_procd(struct uloop_process *proc, int ret)
{
char *wdt_fd = watchdog_fd();
spawn_procd(struct uloop_process *proc, int ret)
{
char *wdt_fd = watchdog_fd();
- char *argv[] = { "/sbin/procd", NULL };
+ char *argv[] = { "/sbin/procd", "-d", "0", NULL };
struct stat s;
if (plugd_proc.pid > 0)
struct stat s;
if (plugd_proc.pid > 0)
DEBUG(2, "Exec to real procd now\n");
if (wdt_fd)
setenv("WDTFD", wdt_fd, 1);
DEBUG(2, "Exec to real procd now\n");
if (wdt_fd)
setenv("WDTFD", wdt_fd, 1);
+ if (debug)
+ snprintf(argv[2], 2, "%d", debug & 0xf);
+ else
+ argv[1] = NULL;
"Options:\n"
"\t-s <path>\tPath to ubus socket\n"
"\t-h <path>\trun as hotplug daemon\n"
"Options:\n"
"\t-s <path>\tPath to ubus socket\n"
"\t-h <path>\trun as hotplug daemon\n"
- "\td\t\tEnable debug messages\n"
+ "\t-d <level>\tEnable debug messages\n"
- while ((ch = getopt(argc, argv, "ds:h:")) != -1) {
+ while ((ch = getopt(argc, argv, "d:s:h:")) != -1) {
switch (ch) {
case 'h':
return hotplug_run(optarg);
switch (ch) {
case 'h':
return hotplug_run(optarg);
ubus_socket = optarg;
break;
case 'd':
ubus_socket = optarg;
break;
case 'd':
break;
default:
return usage(argv[0]);
break;
default:
return usage(argv[0]);