diff options
author | Roy Marples <roy@marples.name> | 2009-05-29 14:15:12 +0100 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2009-05-29 14:15:12 +0100 |
commit | 83e82c452e89bf27de2a7b01bc2356c9050b2a18 (patch) | |
tree | a4f8843c7c02a6b51abb06a16f0a9a6665facc71 /src/rc/runscript.c | |
parent | 9c5faf231ccf50695270034ab63f747fa2bef1d7 (diff) | |
parent | a518d34549fd80268e9c70d2300808b63c54825c (diff) |
Merge branch 'master' of ssh://roy.marples.name/var/git/openrc
Diffstat (limited to 'src/rc/runscript.c')
-rw-r--r-- | src/rc/runscript.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/rc/runscript.c b/src/rc/runscript.c index cec7e01f..44da58c5 100644 --- a/src/rc/runscript.c +++ b/src/rc/runscript.c @@ -398,10 +398,10 @@ svc_exec(const char *arg1, const char *arg2) service, strerror(errno)); _exit(EXIT_FAILURE); } else { - execl(RC_LIBDIR "/sh/runscript.sh", - RC_LIBDIR "/sh/runscript.sh", + execl(RC_LIBEXECDIR "/sh/runscript.sh", + RC_LIBEXECDIR "/sh/runscript.sh", service, arg1, arg2, (char *) NULL); - eerror("%s: exec `" RC_LIBDIR "/sh/runscript.sh': %s", + eerror("%s: exec `" RC_LIBEXECDIR "/sh/runscript.sh': %s", service, strerror(errno)); _exit(EXIT_FAILURE); } @@ -586,10 +586,9 @@ svc_start_check(void) fcntl(exclusive_fd, F_SETFD, fcntl(exclusive_fd, F_GETFD, 0) | FD_CLOEXEC); - if (state & RC_SERVICE_STARTED) { - ewarn("WARNING: %s has already been started", applet); - return; - } else if (state & RC_SERVICE_INACTIVE && !in_background) + if (state & RC_SERVICE_STARTED) + ewarnx("WARNING: %s has already been started", applet); + else if (state & RC_SERVICE_INACTIVE && !in_background) ewarnx("WARNING: %s has already started, but is inactive", applet); @@ -837,10 +836,8 @@ svc_stop_check(RC_SERVICE *state) fcntl(exclusive_fd, F_SETFD, fcntl(exclusive_fd, F_GETFD, 0) | FD_CLOEXEC); - if (*state & RC_SERVICE_STOPPED) { - ewarn("WARNING: %s is already stopped", applet); - return; - } + if (*state & RC_SERVICE_STOPPED) + ewarnx("WARNING: %s is already stopped", applet); rc_service_mark(service, RC_SERVICE_STOPPING); hook_out = RC_HOOK_SERVICE_STOP_OUT; |