1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-08 21:17:47 +03:00

rc-local-generator: provide more debugging information

C.f. https://bugzilla.redhat.com/show_bug.cgi?id=1516188.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-11-27 15:24:07 +01:00
parent 1332ecb8ad
commit 19069ed853

View File

@ -53,13 +53,19 @@ static int run(int argc, char *argv[]) {
if (argc > 1)
arg_dest = argv[1];
if (access(RC_LOCAL_SCRIPT_PATH_START, X_OK) >= 0) {
if (access(RC_LOCAL_SCRIPT_PATH_START, X_OK) < 0)
log_full_errno(errno == ENOENT ? LOG_DEBUG : LOG_WARNING, errno,
RC_LOCAL_SCRIPT_PATH_START " is not executable: %m");
else {
log_debug("Automatically adding rc-local.service.");
r = add_symlink("rc-local.service", "multi-user.target");
}
if (access(RC_LOCAL_SCRIPT_PATH_STOP, X_OK) >= 0) {
if (access(RC_LOCAL_SCRIPT_PATH_STOP, X_OK) < 0)
log_full_errno(errno == ENOENT ? LOG_DEBUG : LOG_WARNING, errno,
RC_LOCAL_SCRIPT_PATH_STOP " is not executable: %m");
else {
log_debug("Automatically adding halt-local.service.");
k = add_symlink("halt-local.service", "final.target");