aboutsummaryrefslogtreecommitdiff
path: root/src/rc/runscript.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-17 17:57:07 +0000
committerRoy Marples <roy@marples.name>2008-03-17 17:57:07 +0000
commitb9eb450696eec614acc983648e2ab04f3fd44463 (patch)
tree1d692caf87563db35a4e84660a93502b598588ba /src/rc/runscript.c
parentc74cfabe2e066a1bbf7fb8e6dfe652fe012c70bf (diff)
Fix some tests on FreeBSD.
Diffstat (limited to 'src/rc/runscript.c')
-rw-r--r--src/rc/runscript.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index 08d2c4e8..2cab4dc8 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -220,7 +220,7 @@ static bool in_control()
if (sighup)
return false;
- if (! mtime_test || ! exists(mtime_test))
+ if (! *mtime_test || ! exists(mtime_test))
return false;
if (rc_service_state(applet) & RC_SERVICE_STOPPED)
@@ -840,9 +840,7 @@ static void svc_start(bool deps)
unlink_mtime_test();
hook_out = RC_HOOK_SERVICE_START_OUT;
rc_plugin_run(RC_HOOK_SERVICE_START_DONE, applet);
-
- if (exclusive)
- unlink(exclusive);
+ unlink(exclusive);
/* Now start any scheduled services */
services = rc_services_scheduled(service);
@@ -1019,8 +1017,7 @@ static void svc_stop(bool deps)
unlink_mtime_test();
hook_out = RC_HOOK_SERVICE_STOP_OUT;
rc_plugin_run(RC_HOOK_SERVICE_STOP_DONE, applet);
- if (exclusive)
- unlink(exclusive);
+ unlink(exclusive);
hook_out = 0;
rc_plugin_run(RC_HOOK_SERVICE_STOP_OUT, applet);
}