aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-06-26 08:47:46 +0000
committerRoy Marples <roy@marples.name>2007-06-26 08:47:46 +0000
commit0575c15993403532d96920ae443655a2deb5393e (patch)
tree85da093be502a8924723bedb381b4d4c4808b70d /src
parent75f776732bdab9d8f76fc6a47dd5008ed7e0fd50 (diff)
Change pwd to / for all init scripts, #181224.
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) {