Give an error when running zap as a generic user.
This commit is contained in:
parent
034b9b7a12
commit
8759735711
@ -547,7 +547,10 @@ bool rc_service_mark(const char *service, const RC_SERVICE state)
|
|||||||
symlink(init, was);
|
symlink(init, was);
|
||||||
skip_wasinactive = true;
|
skip_wasinactive = true;
|
||||||
}
|
}
|
||||||
unlink(file);
|
if (unlink(file) == -1) {
|
||||||
|
free(init);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1306,7 +1306,8 @@ int runscript(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
} else if (strcmp(optarg, "zap") == 0) {
|
} else if (strcmp(optarg, "zap") == 0) {
|
||||||
einfo("Manually resetting %s to stopped state", applet);
|
einfo("Manually resetting %s to stopped state", applet);
|
||||||
rc_service_mark(applet, RC_SERVICE_STOPPED);
|
if (!rc_service_mark(applet, RC_SERVICE_STOPPED))
|
||||||
|
eerrorx("rc_service_mark: %s", strerror(errno));
|
||||||
uncoldplug();
|
uncoldplug();
|
||||||
} else
|
} else
|
||||||
svc_exec(optarg, NULL);
|
svc_exec(optarg, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user