mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-10 01:17:44 +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:
parent
1332ecb8ad
commit
19069ed853
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user