diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-05-22 21:56:04 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-05-22 21:56:04 +0000 |
commit | 82d0f92ab8b84466ae20ab919c1f9c3577b5cecb (patch) | |
tree | 776015ae6c6a386125b2d39e13b62f91b99548f8 /layout/rootfs/etc/s6-linux-init | |
download | lh-bootstrap-82d0f92ab8b84466ae20ab919c1f9c3577b5cecb.tar.xz |
Initial commit
Diffstat (limited to 'layout/rootfs/etc/s6-linux-init')
16 files changed, 75 insertions, 0 deletions
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 --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/env-stage2/.empty 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 --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/run-image/shm/.empty 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 --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/run-image/tmp/.empty 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 --- /dev/null +++ b/layout/rootfs/etc/s6-linux-init/run-image/uncaught-logs/.empty |