From 82d0f92ab8b84466ae20ab919c1f9c3577b5cecb Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 22 May 2017 21:56:04 +0000 Subject: Initial commit --- layout/rootfs/etc/s6-linux-init/env-stage2/.empty | 0 layout/rootfs/etc/s6-linux-init/env/PATH | 1 + layout/rootfs/etc/s6-linux-init/init | 24 ++++++++++++++++++++++ .../run-image/service/.s6-svscan/SIGHUP | 4 ++++ .../run-image/service/.s6-svscan/SIGINT | 4 ++++ .../run-image/service/.s6-svscan/SIGQUIT | 4 ++++ .../run-image/service/.s6-svscan/SIGTERM | 4 ++++ .../run-image/service/.s6-svscan/SIGUSR1 | 4 ++++ .../run-image/service/.s6-svscan/SIGUSR2 | 4 ++++ .../run-image/service/.s6-svscan/crash | 7 +++++++ .../run-image/service/.s6-svscan/finish | 9 ++++++++ .../service/s6-linux-init-early-getty/run | 3 +++ .../run-image/service/s6-svscan-log/run | 7 +++++++ .../rootfs/etc/s6-linux-init/run-image/shm/.empty | 0 .../rootfs/etc/s6-linux-init/run-image/tmp/.empty | 0 .../s6-linux-init/run-image/uncaught-logs/.empty | 0 16 files changed, 75 insertions(+) create mode 100644 layout/rootfs/etc/s6-linux-init/env-stage2/.empty create mode 100644 layout/rootfs/etc/s6-linux-init/env/PATH create mode 100755 layout/rootfs/etc/s6-linux-init/init create mode 100755 layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGHUP create mode 100755 layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGINT create mode 100755 layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGQUIT create mode 100755 layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGTERM create mode 100755 layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGUSR1 create mode 100755 layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGUSR2 create mode 100755 layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/crash create mode 100755 layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/finish create mode 100755 layout/rootfs/etc/s6-linux-init/run-image/service/s6-linux-init-early-getty/run create mode 100755 layout/rootfs/etc/s6-linux-init/run-image/service/s6-svscan-log/run create mode 100644 layout/rootfs/etc/s6-linux-init/run-image/shm/.empty create mode 100644 layout/rootfs/etc/s6-linux-init/run-image/tmp/.empty create mode 100644 layout/rootfs/etc/s6-linux-init/run-image/uncaught-logs/.empty (limited to 'layout/rootfs/etc/s6-linux-init') diff --git a/layout/rootfs/etc/s6-linux-init/env-stage2/.empty b/layout/rootfs/etc/s6-linux-init/env-stage2/.empty new file mode 100644 index 0000000..e69de29 diff --git a/layout/rootfs/etc/s6-linux-init/env/PATH b/layout/rootfs/etc/s6-linux-init/env/PATH new file mode 100644 index 0000000..a13f7be --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/env/PATH @@ -0,0 +1 @@ +/command:/bin diff --git a/layout/rootfs/etc/s6-linux-init/init b/layout/rootfs/etc/s6-linux-init/init new file mode 100755 index 0000000..358c2f5 --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/init @@ -0,0 +1,24 @@ +#!/command/execlineb -P + +/command/export PATH /command:/bin +/command/cd / +s6-setsid -qb -- +umask 022 +if { s6-echo -- "\n init created by s6-linux-init-maker\n see http://skarnet.org/software/s6-linux-init/\n\n" } +if { s6-mount -nwt tmpfs -o mode=0755 tmpfs /run } +if { s6-hiercopy /etc/s6-linux-init/run-image /run } + +s6-envdir -I -- /etc/s6-linux-init/env +redirfd -r 0 /dev/null +redirfd -wnb 1 /run/service/s6-svscan-log/fifo +background +{ + s6-setsid -- + redirfd -w 1 /run/service/s6-svscan-log/fifo + fdmove -c 2 1 + /etc/rc.init +} +unexport ! +cd /run/service +fdmove -c 2 1 +s6-svscan -st0 diff --git a/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGHUP b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGHUP new file mode 100755 index 0000000..ffdd1bb --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGHUP @@ -0,0 +1,4 @@ +#!/package/admin/execline/command/execlineb -P + +foreground { "/etc/rc.tini" } +s6-svscanctl -h -- "/run"/service diff --git a/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGINT b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGINT new file mode 100755 index 0000000..02fdc52 --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGINT @@ -0,0 +1,4 @@ +#!/package/admin/execline/command/execlineb -P + +foreground { "/etc/rc.tini" } +s6-svscanctl -6 -- "/run"/service diff --git a/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGQUIT b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGQUIT new file mode 100755 index 0000000..0ca5346 --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGQUIT @@ -0,0 +1,4 @@ +#!/package/admin/execline/command/execlineb -P + +foreground { "/etc/rc.tini" } +s6-svscanctl -q -- "/run"/service diff --git a/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGTERM b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGTERM new file mode 100755 index 0000000..329830d --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGTERM @@ -0,0 +1,4 @@ +#!/package/admin/execline/command/execlineb -P + +foreground { "/etc/rc.tini" } +s6-svscanctl -t -- "/run"/service diff --git a/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGUSR1 b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGUSR1 new file mode 100755 index 0000000..8580a65 --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGUSR1 @@ -0,0 +1,4 @@ +#!/package/admin/execline/command/execlineb -P + +foreground { "/etc/rc.tini" } +s6-svscanctl -7 -- "/run"/service diff --git a/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGUSR2 b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGUSR2 new file mode 100755 index 0000000..54c54b8 --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/SIGUSR2 @@ -0,0 +1,4 @@ +#!/package/admin/execline/command/execlineb -P + +foreground { "/etc/rc.tini" } +s6-svscanctl -0 -- "/run"/service diff --git a/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/crash b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/crash new file mode 100755 index 0000000..adc08db --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/crash @@ -0,0 +1,7 @@ +#!/command/execlineb -P + +redirfd -r 0 /dev/console +redirfd -w 1 /dev/console +fdmove -c 2 1 +foreground { s6-echo -- "s6-svscan crashed. Dropping to an interactive shell." } +/bin/sh -i diff --git a/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/finish b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/finish new file mode 100755 index 0000000..d6aaa00 --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/run-image/service/.s6-svscan/finish @@ -0,0 +1,9 @@ +#!/command/execlineb -S0 + +cd / +redirfd -w 2 /dev/console +fdmove -c 1 2 +foreground { s6-svc -X -- "/run"/service/s6-svscan-log } +unexport ? +wait -r -- { } +"/etc/rc.shutdown" ${@} diff --git a/layout/rootfs/etc/s6-linux-init/run-image/service/s6-linux-init-early-getty/run b/layout/rootfs/etc/s6-linux-init/run-image/service/s6-linux-init-early-getty/run new file mode 100755 index 0000000..c48b72d --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/run-image/service/s6-linux-init-early-getty/run @@ -0,0 +1,3 @@ +#!/command/execlineb -P + +getty -L -H %%HOSTNAME%% 38400 /dev/%%CONSOLE%% diff --git a/layout/rootfs/etc/s6-linux-init/run-image/service/s6-svscan-log/run b/layout/rootfs/etc/s6-linux-init/run-image/service/s6-svscan-log/run new file mode 100755 index 0000000..896a294 --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/run-image/service/s6-svscan-log/run @@ -0,0 +1,7 @@ +#!/command/execlineb -P + +redirfd -w 2 /dev/console +redirfd -w 1 /dev/null +redirfd -rnb 0 fifo +s6-applyuidgid -u 98 -g 98 -- +s6-log -bp -- t /run/uncaught-logs diff --git a/layout/rootfs/etc/s6-linux-init/run-image/shm/.empty b/layout/rootfs/etc/s6-linux-init/run-image/shm/.empty new file mode 100644 index 0000000..e69de29 diff --git a/layout/rootfs/etc/s6-linux-init/run-image/tmp/.empty b/layout/rootfs/etc/s6-linux-init/run-image/tmp/.empty new file mode 100644 index 0000000..e69de29 diff --git a/layout/rootfs/etc/s6-linux-init/run-image/uncaught-logs/.empty b/layout/rootfs/etc/s6-linux-init/run-image/uncaught-logs/.empty new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3