summaryrefslogtreecommitdiff
path: root/src/shutdown/s6-linux-init-shutdownd.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-04-28 16:42:11 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-04-28 16:42:11 +0000
commit1c31b92725f8c121bed55d2f7446d6c7e7f7824e (patch)
tree1b8ffe4ecc4689d071eaa1a07556268d587b9513 /src/shutdown/s6-linux-init-shutdownd.c
parente433e4088f0990009f9bb78757ad145317ba91ec (diff)
downloads6-linux-init-1c31b92725f8c121bed55d2f7446d6c7e7f7824e.tar.xz
Fix stage2 and stage3 invocation paths
Diffstat (limited to 'src/shutdown/s6-linux-init-shutdownd.c')
-rw-r--r--src/shutdown/s6-linux-init-shutdownd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shutdown/s6-linux-init-shutdownd.c b/src/shutdown/s6-linux-init-shutdownd.c
index 90d43e8..c01727d 100644
--- a/src/shutdown/s6-linux-init-shutdownd.c
+++ b/src/shutdown/s6-linux-init-shutdownd.c
@@ -40,10 +40,10 @@ static inline void run_stage3 (char const *basedir, char const *const *envp)
{
pid_t pid ;
size_t basedirlen = strlen(basedir) ;
- char stage3[basedirlen + sizeof("/" STAGE3)] ;
+ char stage3[basedirlen + sizeof("/scripts/" STAGE3)] ;
char const *stage3_argv[2] = { stage3, 0 } ;
memcpy(stage3, basedir, basedirlen) ;
- memcpy(stage3 + basedirlen, "/" STAGE3, sizeof("/" STAGE3)) ;
+ memcpy(stage3 + basedirlen, "/scripts/" STAGE3, sizeof("/scripts/" STAGE3)) ;
pid = child_spawn0(stage3_argv[0], stage3_argv, envp) ;
if (pid)
{