summaryrefslogtreecommitdiffstats
path: root/src/rc-local-generator/rc-local-generator.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-11-27 15:24:07 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-11-27 15:24:07 +0100
commit19069ed853b33a1c10e7c6b8b2005e2a74e27047 (patch)
tree6deecccdef06de5b9b501423d58adbfcd9cb5475 /src/rc-local-generator/rc-local-generator.c
parentrc-local-generator: use macro to define main() (diff)
downloadsystemd-19069ed853b33a1c10e7c6b8b2005e2a74e27047.tar.xz
systemd-19069ed853b33a1c10e7c6b8b2005e2a74e27047.zip
rc-local-generator: provide more debugging information
C.f. https://bugzilla.redhat.com/show_bug.cgi?id=1516188.
Diffstat (limited to 'src/rc-local-generator/rc-local-generator.c')
-rw-r--r--src/rc-local-generator/rc-local-generator.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rc-local-generator/rc-local-generator.c b/src/rc-local-generator/rc-local-generator.c
index b7cb04fc6f..11f18b1173 100644
--- a/src/rc-local-generator/rc-local-generator.c
+++ b/src/rc-local-generator/rc-local-generator.c
@@ -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");