/root/s6-init d o0:0 m755 /root/s6-init/install C #!/bin/zsh cd $0:h || exit $? if [[ -d basedir ]]; then rm -rf basedir || exit $? fi s6-linux-init-maker \ -b /bin \ -p /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ basedir || exit $? # -G "/sbin/getty 38400 tty2" \ rsync -aAH --delete ./basedir/ /etc/s6-linux-init/ o0:0 m755 /etc/s6-rc d o0:0 m755 /etc/s6-rc/compile C #!/bin/zsh zmodload zsh/stat || exit $? zmodload zsh/datetime || exit $? set -x cd $0:h || exit $? dst=./versions/compiled.$EPOCHSECONDS s6-rc-compile $dst.new source || exit $? s6-rename $dst.new $dst || exit $? exec s6-ln -s -f -n $dst compiled # if [[ -d compiled ]]; then # if [[ ! -e old ]]; then # mkdir old || exit $? # fi # s6-rename ./compiled ./old/compiled.$(zstat +mtime compiled) || exit $? # fi o0:0 m755 /etc/s6-rc/source d o0:0 m755 /etc/s6-rc/source/ok-all d o0:0 m755 /etc/s6-rc/source/ok-all/type c bundle o0:0 m644 /etc/s6-rc/update C #!/bin/zsh zmodload zsh/stat || exit $? zmodload zsh/datetime || exit $? set -x cd $0:h || exit $? dst=./versions/compiled.$EPOCHSECONDS s6-rc-compile $dst.new source || exit $? s6-rename $dst.new $dst || exit $? s6-rc-update -v 2 $(realpath $dst) || exit $? s6-rc -u change ok-all || exit $? exec s6-ln -s -f -n $dst compiled o0:0 m755 /etc/s6-rc/versions d o0:0 m755 /etc/rc.init C #!/bin/execlineb -P export TERM "linux" # Set the system clock to something sensible, # to get coherent logs until the initial NTP exchange if { /sbin/openrc sysinit } #if { /sbin/openrc boot } #if { /sbin/openrc default } # if { s6-clock @400000005a58000000000000 } # Initialize the service manager if { s6-rc-init -d /run/service } # Run the service manager. # Call it twice because the first time may spuriously "timeout" # due to the clock jumping forward. if -nt { s6-rc -t 600000 -- change ok-all } s6-rc -t 600000 -- change ok-all o0:0 m755 /etc/rc.shutdown C #!/bin/execlineb -P redirfd -w 1 /dev/console fdmove -c 2 1 foreground { s6-echo "/etc/rc.shutdown called" } # Write a message to /var/log/syslogd foreground { s6-ipcclient -l0 /dev/log fdmove 1 7 s6-echo "/etc/rc.shutdown: shutdown requested" } # foreground { /sbin/openrc shutdown } # Shut down all services if -n { s6-rc -da change } foreground { s6-echo "`s6-rc -da change` failed" } foreground { sleep 2s } o0:0 m755 /sbin/init l ../etc/s6-linux-init/init o0:0