// try to reopen incase the wdt was not available before coldplug
watchdog_init(0);
set_stdio("console");
- LOG("- ubus -\n");
p = getpwnam("ubus");
if (p) {
+ int ret;
+ LOG("- ubus -\n");
mkdir(p->pw_dir, 0755);
- chown(p->pw_dir, p->pw_uid, p->pw_gid);
+ ret = chown(p->pw_dir, p->pw_uid, p->pw_gid);
+ if (ret)
+ LOG("- ubus - failed to chown(%s)\n", p->pw_dir);
+ } else {
+ LOG("- ubus (running as root!) -\n");
}
+
procd_connect_ubus();
service_start_early("ubus", ubus_cmd, p?"ubus":NULL, p?"ubus":NULL);
break;