summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-06-22 13:29:03 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-06-22 13:29:03 +0000
commitbc77187b8d2140eb46ec8b7557858557b26a44ee (patch)
tree5989039af835beb7f8b8df43cacd33d4bdc812fd /src
parent6ad5a6921e26fc312f52920194523f39e3daa17d (diff)
downloads6-linux-init-bc77187b8d2140eb46ec8b7557858557b26a44ee.tar.xz
Don't test for shutdown.allow in containers
Diffstat (limited to 'src')
-rw-r--r--src/init/s6-linux-init-maker.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/init/s6-linux-init-maker.c b/src/init/s6-linux-init-maker.c
index 9ad8302..35beb3e 100644
--- a/src/init/s6-linux-init-maker.c
+++ b/src/init/s6-linux-init-maker.c
@@ -226,10 +226,14 @@ static int runleveld_script (buffer *b, char const *data)
static int sig_script (buffer *b, char const *option)
{
- return put_shebang(b)
- && buffer_puts(b, S6_LINUX_INIT_EXTBINPREFIX "s6-linux-init-shutdown -a ") >= 0
- && buffer_puts(b, option) >= 0
- && buffer_puts(b, " -- now\n") >= 0 ;
+ if (!put_shebang(b)
+ || buffer_puts(b, S6_LINUX_INIT_EXTBINPREFIX "s6-linux-init-shutdown ") < 0)
+ return 0 ;
+ if (!inns && buffer_puts(b, "-a ") < 0) return 0 ;
+ if (buffer_puts(b, option) < 0
+ || buffer_puts(b, " -- now\n") < 0)
+ return 0 ;
+ return 1 ;
}
static inline int stage1_script (buffer *b, char const *data)