aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/runscript.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runscript.c b/src/runscript.c
index 50a1931e..18ee1ddd 100644
--- a/src/runscript.c
+++ b/src/runscript.c
@@ -977,6 +977,9 @@ int main (int argc, char **argv)
service = argv[1];
applet = rc_xstrdup (basename (service));
atexit (cleanup);
+
+ /* Change dir to / to ensure all init scripts don't use stuff in pwd */
+ chdir ("/");
/* Show help if insufficient args */
if (argc < 3) {