]> git.netwichtig.de Git - user/henk/code/puppet/modules/s6.git/commitdiff
buster gets the wrapper script from the module, not the package
authorHendrik Jäger <gitcommit@henk.geekmail.org>
Wed, 27 Apr 2022 21:21:11 +0000 (23:21 +0200)
committerHendrik Jäger <gitcommit@henk.geekmail.org>
Sun, 22 May 2022 18:04:54 +0000 (20:04 +0200)
files/usr/local/bin/s6-svscanboot.buster [new file with mode: 0644]
manifests/install.pp

diff --git a/files/usr/local/bin/s6-svscanboot.buster b/files/usr/local/bin/s6-svscanboot.buster
new file mode 100644 (file)
index 0000000..ef6de1b
--- /dev/null
@@ -0,0 +1,33 @@
+#!/usr/local/bin/execlineb -S1
+
+foreground { redirfd -w 2 /dev/null mkdir -p /run/uncaught-logs }
+if { chown s6-logs:s6-logs /run/uncaught-logs }
+if { chmod 2700 /run/uncaught-logs }
+foreground { redirfd -w 2 /dev/null mkdir -p ${1}/.s6-svscan ${1}/s6-svscan-log }
+foreground { redirfd -w 2 /dev/null ln -sf /bin/false ${1}/.s6-svscan/crash }
+if
+{
+  redirfd -w 1 ${1}/.s6-svscan/finish
+  heredoc 0 "#!/usr/local/bin/execlineb -P\ns6-svc -x -- \"${1}/s6-svscan-log\"\n"
+  cat
+}
+if { chmod 0755 ${1}/.s6-svscan/finish }
+foreground { redirfd -w 2 /dev/null mkfifo -m 0600 ${1}/s6-svscan-log/fifo }
+if
+{
+  redirfd -w 1 ${1}/s6-svscan-log/run
+  heredoc 0 "#!/usr/local/bin/execlineb -P
+redirfd -w 2 /dev/console
+redirfd -rnb 0 fifo
+s6-setuidgid s6-logs
+exec -c
+s6-log t /run/uncaught-logs\n"
+  cat
+}
+if { chmod 0755 ${1}/s6-svscan-log/run }
+
+redirfd -r 0 /dev/null
+redirfd -wnb 1 ${1}/s6-svscan-log/fifo
+fdmove -c 2 1
+s6-svscan -- ${1}
+
index f26627691009fd5630d7fa0cdd087428f00227b4..2042f8a34faabd8e767024f640b6c1a748d46433 100644 (file)
@@ -7,7 +7,10 @@ class s6::install {
   file {
     '/usr/local/bin/s6-svscanboot':
       ensure  => present,
-      source  => 'puppet:///modules/s6/usr/local/bin/s6-svscanboot',
+      source  => [
+        "puppet:///modules/s6/usr/local/bin/s6-svscanboot.${facts['os']['distro']['codename']}",
+        'puppet:///modules/s6/usr/local/bin/s6-svscanboot',
+      ],
       mode    => '0755',
       require => Package['s6'],
     ;