aboutsummaryrefslogtreecommitdiff
path: root/src/rc/runscript.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc/runscript.c')
-rw-r--r--src/rc/runscript.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index 5dab6763..58067a71 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -1106,7 +1106,8 @@ runscript(int argc, char **argv)
usage(EXIT_FAILURE);
/* Change dir to / to ensure all init scripts don't use stuff in pwd */
- chdir("/");
+ if (chdir("/") == -1)
+ eerror("chdir: %s", strerror(errno));
if ((runlevel = xstrdup(getenv("RC_RUNLEVEL"))) == NULL) {
env_filter();