Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c7d9be62f8 | ||
![]() |
608df4bd47 | ||
![]() |
c32cc76462 | ||
![]() |
065c79b9ff | ||
![]() |
97f13d2f1a | ||
![]() |
983d28ae45 | ||
![]() |
1470fda317 | ||
![]() |
9e41be013b | ||
![]() |
b53a85ef5c | ||
![]() |
3790871455 | ||
![]() |
4aece292a1 | ||
![]() |
ce00a75a25 | ||
![]() |
473a622f41 |
1
base-env/DESTBOOTSERV
Normal file
1
base-env/DESTBOOTSERV
Normal file
@@ -0,0 +1 @@
|
||||
/run/boot
|
1
base-env/DESTRCSERV
Normal file
1
base-env/DESTRCSERV
Normal file
@@ -0,0 +1 @@
|
||||
/run/boot-rc
|
1
base-env/S6CONF
Normal file
1
base-env/S6CONF
Normal file
@@ -0,0 +1 @@
|
||||
/run/s6-conf
|
1
base-env/SRCRCCOMPILED
Normal file
1
base-env/SRCRCCOMPILED
Normal file
@@ -0,0 +1 @@
|
||||
/etc/s6/compiled
|
1
base-env/SRCRCSERV
Normal file
1
base-env/SRCRCSERV
Normal file
@@ -0,0 +1 @@
|
||||
/etc/s6/boot-rc-serv
|
@@ -1,16 +1,13 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
fdmove -c 2 1
|
||||
if { s6-echo -- 00 started }
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
# mount proc sys dev run if doesn't exist
|
||||
#import -i HOSTNAME
|
||||
#if { s6-hostname $HOSTNAME }
|
||||
foreground {
|
||||
forx -p first { proc sys dev run }
|
||||
importas -ui -D "" first first
|
||||
foreground {
|
||||
if -n { mountpoint -q /$first }
|
||||
s6-envdir /etc/s6/env/mount/$first
|
||||
s6-envdir /etc/s6/filesystem-env/$first
|
||||
importas -ui -D "" fstype fstype
|
||||
importas -ui -D "" device device
|
||||
importas -ui -D "" mountpoint mountpoint
|
||||
@@ -38,7 +35,7 @@ if {
|
||||
foreground {
|
||||
if -n { mountpoint -q /dev/$third }
|
||||
if { s6-mkdir -p -m 0755 /dev/$third }
|
||||
s6-envdir /etc/s6/env/mount/$third
|
||||
s6-envdir /etc/s6/filesystem-env/$third
|
||||
importas -ui -D "" fstype fstype
|
||||
importas -ui -D "" device device
|
||||
importas -ui -D "" mountpoint mountpoint
|
||||
|
@@ -1,3 +1,4 @@
|
||||
00
|
||||
s6-conf
|
||||
all-Boot
|
||||
#all-User
|
||||
all-Switch
|
||||
|
@@ -1,4 +1,3 @@
|
||||
00
|
||||
rofs-cgroups
|
||||
rofs-kernmod
|
||||
rofs-console
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
fdmove -c 2 1
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
if { s6-echo -- checkfs-brtfs started }
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
s6-envdir ${S6CONF}
|
||||
importas -D "" USEBTRFS USEBTRFS
|
||||
foreground {
|
||||
if { s6-test $USEBTRFS = yes }
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
fdmove -c 2 1
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
if { s6-echo -- checkfs-dmraid started }
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
s6-envdir ${S6CONF}
|
||||
importas -D "" USEDMRAID USEDMRAID
|
||||
foreground {
|
||||
if { s6-test $USEDMRAID = yes }
|
||||
|
@@ -1,7 +1,9 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
fdmove -c 2 1
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
if { s6-echo -- checkfs-fsckeck started }
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
s6-envdir ${S6CONF}
|
||||
importas -D "" FORCECHCK FORCECHCK
|
||||
foreground {
|
||||
if { s6-test $FORCECHCK = yes }
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
fdmove -c 2 1
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
s6-envdir ${S6CONF}
|
||||
importas -D "" USELVM USELVM
|
||||
foreground {
|
||||
if { s6-test $USELVM = yes }
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
fdmove -c 2 1
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
if { s6-echo -- rofs-cgroups started }
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
s6-envdir ${S6CONF}
|
||||
importas -D "" CGROUPS CGROUPS
|
||||
foreground {
|
||||
if { s6-test $CGROUPS = yes }
|
||||
|
@@ -1,19 +1,19 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
fdmove -c 2 1
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
if { s6-echo -- rofs-console started }
|
||||
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
import -D "" KEYMAP
|
||||
import -D "" FONT
|
||||
import -D "" FONT_MAP
|
||||
import -D "" FONT_UNIMAP
|
||||
s6-envdir ${S6CONF}
|
||||
importas -D "" KEYMAP KEYMAP
|
||||
importas -D "" FONT FONT
|
||||
importas -D "" FONT_MAP FONT_MAP
|
||||
importas -D "" FONT_UNIMAP FONT_UNIMAP
|
||||
foreground {
|
||||
loadkeys -q -u $KEYMAP
|
||||
}
|
||||
foreground {
|
||||
forx index { 0 1 2 3 4 5 6 7 8 9 10 }
|
||||
importas -u -D "" index index
|
||||
setfont -m $FONT_MAP -u $FONT_UNIMAP $FONT -C /dev/tty${index}
|
||||
exec bash -c "setfont ${FONT_MAP:+-m $FONT_MAP} ${FONT_UNIMAP:+-u $FONT_UNIMAP} $FONT -C /dev/tty${index}"
|
||||
}
|
||||
s6-echo -- rofs-console successfully started
|
||||
|
@@ -1,11 +1,12 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
fdmove -c 2 1
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
if { s6-echo -- rofs-hardclock started }
|
||||
foreground {
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
import -D "" TZ
|
||||
import -D "" HARDWARECLOCK
|
||||
s6-envdir ${S6CONF}
|
||||
importas -D "" TZ TZ
|
||||
importas -D "" HARDWARECLOCK HARDWARECLOCK
|
||||
pipeline -d { echo $HARDWARECLOCK }
|
||||
pipeline { tr A-Z a-z }
|
||||
forstdin -- clock
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
fdmove -c 2 1
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
if { s6-echo -- rofs-kernruntime started }
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
s6-envdir ${S6CONF}
|
||||
importas -D "" KERNELRUNTIME KERNELRUNTIME
|
||||
foreground {
|
||||
if { s6-test $KERNELRUNTIME = yes }
|
||||
|
@@ -1,10 +1,11 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
fdmove -c 2 1
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
if { s6-echo -- rofs-modules started }
|
||||
foreground {
|
||||
if { s6-test -e /etc/s6/env/s6-conf/MODULES }
|
||||
redirfd -r 0 /etc/s6/env/s6-conf/MODULES
|
||||
if { s6-test -e ${S6CONF}/MODULES }
|
||||
redirfd -r 0 ${S6CONF}/MODULES
|
||||
forstdin -n -- mods
|
||||
importas -ui -D "" mods mods
|
||||
foreground {
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
fdmove -c 2 1
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
if { s6-echo -- rofs-swap started }
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
s6-envdir ${S6CONF}
|
||||
importas -D "" USESWAP USESWAP
|
||||
foreground {
|
||||
if { s6-test $USESWAP = yes }
|
||||
|
@@ -1,8 +1,10 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
fdmove -c 2 1
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
import -D "" IPTABLES
|
||||
import -D "" IP6TABLES
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
s6-envdir ${S6CONF}
|
||||
importas -i -D "" IPTABLES IPTABLES
|
||||
importas -i -D "" IP6TABLES IP6TABLES
|
||||
foreground {
|
||||
if { s6-test $IPTABLES = yes }
|
||||
if { s6-echo -- Flushing iptables }
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
fdmove -c 2 1
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
if { s6-echo -- rwfs-iptables started }
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
s6-envdir ${S6CONF}
|
||||
importas -D "" IPTABLES IPTABLES
|
||||
importas -D "" IP6TABLES IP6TABLES
|
||||
foreground {
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
fdmove -c 2 1
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
if { s6-echo -- rwfs-localtime started }
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
s6-envdir ${S6CONF}
|
||||
importas -D "" TZ TZ
|
||||
if { s6-ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime }
|
||||
s6-echo -- rwfs-localtime successfully started
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
fdmove -c 2 1
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
s6-envdir ${S6CONF}
|
||||
importas -D "" S6LOCAL S6LOCAL
|
||||
ifelse -X { s6-test $S6LOCAL = yes }
|
||||
{ exec -c /etc/s6/data/scripts/s6.local }
|
||||
|
1
boot-rc-serv/s6-conf/type
Normal file
1
boot-rc-serv/s6-conf/type
Normal file
@@ -0,0 +1 @@
|
||||
oneshot
|
25
boot-rc-serv/s6-conf/up
Normal file
25
boot-rc-serv/s6-conf/up
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
fdmove -c 2 1
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
if { s6-echo -- s6-conf started }
|
||||
# parse s6.conf before loading environment
|
||||
foreground {
|
||||
redirfd -r 0 /etc/s6/s6.conf
|
||||
pipeline { s6-grep -vF -- "#" }
|
||||
forstdin -nCd"\n" -- conf
|
||||
importas -ui -D "" conf conf
|
||||
multidefine -d"=" $conf { var value }
|
||||
foreground {
|
||||
if { mkdir -p ${S6CONF}/ }
|
||||
redirfd -w 1 ${S6CONF}/$var
|
||||
s6-echo -- $value
|
||||
}
|
||||
}
|
||||
# load hostname for earlier tty
|
||||
foreground {
|
||||
s6-envdir ${S6CONF}
|
||||
importas -i -D "" HOSTNAME HOSTNAME
|
||||
s6-hostname ${HOSTNAME}
|
||||
}
|
||||
s6-echo -- s6-conf successfully started
|
@@ -1,5 +1,13 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
fdmove -c 2 1
|
||||
if {
|
||||
foreground {
|
||||
if -n { s6-test -d /run/user/uncaught-logs }
|
||||
s6-mkdir -p -m 0755 /run/user/uncaught-logs
|
||||
}
|
||||
}
|
||||
redirfd -an 1 /run/user/uncaught-logs/fifo
|
||||
fdmove -c 2 1
|
||||
if { s6-echo -- switch-user started }
|
||||
if { s6-rc-init -c /etc/s6-serv/enabled/rc/compiled/current -l /run/user-rc /run/user/service }
|
||||
if { s6-rc -l /run/user-rc -u change All }
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" DESTBOOTSERV DESTBOOTSERV
|
||||
foreground { /etc/s6/stage2.tini }
|
||||
s6-svscanctl -h -- /run/boot/service
|
||||
s6-svscanctl -h -- ${DESTBOOTSERV}/service
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" DESTBOOTSERV DESTBOOTSERV
|
||||
foreground { /etc/s6/stage2.tini }
|
||||
s6-svscanctl -6 -- /run/boot/service
|
||||
s6-svscanctl -6 -- ${DESTBOOTSERV}/service
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" DESTBOOTSERV DESTBOOTSERV
|
||||
foreground { /etc/s6/stage2.tini }
|
||||
s6-svscanctl -q -- /run/boot/service
|
||||
s6-svscanctl -q -- ${DESTBOOTSERV}/service
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" DESTBOOTSERV DESTBOOTSERV
|
||||
foreground { /etc/s6/stage2.tini }
|
||||
s6-svscanctl -t -- /run/boot/service
|
||||
s6-svscanctl -t -- ${DESTBOOTSERV}/service
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
s6-svscanctl -an -- /run/boot/service
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" DESTBOOTSERV DESTBOOTSERV
|
||||
s6-svscanctl -an -- ${DESTBOOTSERV}/service
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" DESTBOOTSERV DESTBOOTSERV
|
||||
foreground { /etc/s6/stage2.tini }
|
||||
s6-svscanctl -7 -- /run/boot/service
|
||||
s6-svscanctl -7 -- ${DESTBOOTSERV}/service
|
||||
|
@@ -1,9 +1,10 @@
|
||||
#!/usr/local/bin/execlineb -S0
|
||||
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" DESTBOOTSERV DESTBOOTSERV
|
||||
cd /
|
||||
redirfd -w 2 /dev/console
|
||||
fdmove -c 1 2
|
||||
foreground { s6-svc -X -- /run/boot/service/s6-svscan-log }
|
||||
foreground { s6-svc -X -- ${DESTBOOTSERV}/service/s6-svscan-log }
|
||||
unexport ?
|
||||
wait -r -- { }
|
||||
/etc/s6/stage3 ${@}
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" DESTBOOTSERV DESTBOOTSERV
|
||||
redirfd -w 2 /dev/console
|
||||
fdmove -c 1 2
|
||||
#redirfd -w 1 /dev/null
|
||||
redirfd -rnb 0 fifo
|
||||
s6-applyuidgid -u 19 -g 19 --
|
||||
s6-log -bp -- t /run/boot/uncaught-logs
|
||||
s6-log -bp -- t ${DESTBOOTSERV}/uncaught-logs
|
||||
|
@@ -1,3 +1,3 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
/usr/bin/agetty -J 38400 tty1
|
||||
/usr/bin/agetty --delay 02 -J 38400 tty1
|
||||
|
@@ -1,3 +1,3 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
/usr/bin/agetty -J 38400 tty2
|
||||
/usr/bin/agetty --delay 02 -J 38400 tty2
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -8,8 +8,9 @@ pipeline -dw --
|
||||
}
|
||||
if -nt --
|
||||
{
|
||||
redirfd -r 0 ./data/autofilled
|
||||
s6-ipcclient -l0 -- s
|
||||
/usr/libexec/s6-rc-fdholder-filler -1 --
|
||||
/usr/libexec/s6-rc-fdholder-filler -1 --
|
||||
}
|
||||
s6-svc -t .
|
||||
}
|
||||
|
@@ -4,5 +4,5 @@ fdmove 1 3
|
||||
s6-ipcserver-socketbinder -- s
|
||||
s6-ipcserverd -1 --
|
||||
s6-ipcserver-access -v0 -E -l0 -i data/rules --
|
||||
s6-sudod -t 2000 --
|
||||
s6-sudod -t 30000 --
|
||||
/usr/libexec/s6-rc-oneshot-run -l ../.. --
|
||||
|
1
env/s6-conf
vendored
1
env/s6-conf
vendored
@@ -1 +0,0 @@
|
||||
/run/s6-conf
|
43
init
43
init
@@ -14,35 +14,14 @@
|
||||
|
||||
|
||||
# Export good path
|
||||
/usr/local/bin/export PATH "/usr/local/bin:/usr/bin"
|
||||
|
||||
cd /
|
||||
|
||||
# parse s6.conf before loading environment
|
||||
foreground {
|
||||
redirfd -r 0 /etc/s6/s6.conf
|
||||
pipeline { s6-grep -vF -- "#" }
|
||||
forstdin -nCd"\n" -- conf
|
||||
importas -ui -D "" conf conf
|
||||
multidefine -d"=" $conf { var value }
|
||||
foreground {
|
||||
if { mkdir -p /run/s6-conf/ }
|
||||
redirfd -w 1 /run/s6-conf/$var
|
||||
s6-echo -- $value
|
||||
}
|
||||
}
|
||||
# load hostname for earlier tty
|
||||
foreground {
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
importas -i -D "" HOSTNAME HOSTNAME
|
||||
s6-hostname ${HOSTNAME}
|
||||
}
|
||||
# Clean environment
|
||||
emptyenv -p
|
||||
s6-envdir -if /etc/s6/env
|
||||
/usr/bin/s6-envdir -if /etc/s6/base-env
|
||||
/usr/local/bin/importas -i -D "" PATH PATH
|
||||
/usr/local/bin/export PATH ${PATH}
|
||||
|
||||
/usr/local/bin/cd /
|
||||
|
||||
# Be clean and safe
|
||||
emptyenv -p
|
||||
s6-setsid -qb --
|
||||
umask 022
|
||||
|
||||
@@ -54,22 +33,24 @@ if {
|
||||
}
|
||||
|
||||
# Copy service for pid1 at the right place
|
||||
importas -i -D "" BOOTSERV BOOTSERV
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" SRCBOOTSERV SRCBOOTSERV
|
||||
importas -i -D "" DESTBOOTSERV DESTBOOTSERV
|
||||
foreground {
|
||||
if { s6-hiercopy ${BOOTSERV} /run/boot }
|
||||
if { s6-hiercopy ${SRCBOOTSERV} ${DESTBOOTSERV} }
|
||||
}
|
||||
|
||||
redirfd -r 0 /dev/null
|
||||
redirfd -wnb 1 /run/boot/service/s6-svscan-log/fifo
|
||||
redirfd -wnb 1 ${DESTBOOTSERV}/service/s6-svscan-log/fifo
|
||||
|
||||
# Now we are good for stage2, start it
|
||||
background {
|
||||
s6-setsid --
|
||||
redirfd -w 1 /run/boot/service/s6-svscan-log/fifo
|
||||
redirfd -w 1 ${DESTBOOTSERV}/service/s6-svscan-log/fifo
|
||||
fdmove -c 2 1
|
||||
/etc/s6/stage2
|
||||
}
|
||||
|
||||
unexport !
|
||||
fdmove -c 2 1
|
||||
s6-svscan -st0 /run/boot/service
|
||||
s6-svscan -st0 ${DESTBOOTSERV}/service
|
||||
|
6
poweroff
6
poweroff
@@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
exec /run/boot/service/.s6-svscan/SIGUSR2
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" DESTBOOTSERV DESTBOOTSERV
|
||||
exec ${DESTBOOTSERV}/service/.s6-svscan/SIGUSR2
|
||||
|
6
reboot
6
reboot
@@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
exec /run/boot/service/.s6-svscan/SIGINT
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" DESTBOOTSERV DESTBOOTSERV
|
||||
exec ${DESTBOOTSERV}/service/.s6-svscan/SIGINT
|
||||
|
10
stage2
10
stage2
@@ -12,17 +12,21 @@
|
||||
# can do whatever you want with this stuff. If we meet some day, and you think
|
||||
# this stuff is worth it, you can buy me a beer in return. Eric Vidal http://obarun.org
|
||||
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" DESTRCSERV DESTRCSERV
|
||||
importas -i -D "" DESTBOOTSERV DESTBOOTSERV
|
||||
importas -i -D "" SRCRCCOMPILED SRCRCCOMPILED
|
||||
|
||||
if -nt {
|
||||
if { s6-echo -- "***************************************************************************" }
|
||||
if { s6-echo -- "** Start Stage 2 **" }
|
||||
if { s6-echo -- "***************************************************************************" }
|
||||
# start service
|
||||
if { s6-rc-init -l /run/boot-rc -c /etc/s6/compiled/current /run/boot/service }
|
||||
if { s6-rc -l /run/boot-rc -u change All }
|
||||
if { s6-rc-init -l ${DESTRCSERV} -c ${SRCRCCOMPILED}/current ${DESTBOOTSERV}/service }
|
||||
if { s6-rc -l ${DESTRCSERV} -u change All }
|
||||
if { s6-echo -- "***************************************************************************" }
|
||||
if { s6-echo -- "** Stage 2 completed **" }
|
||||
s6-echo -- "***************************************************************************"
|
||||
}
|
||||
redirfd -w 1 /dev/console
|
||||
s6-echo "Something wrong on stage2, please see the log at /run/boot/uncaught-logs/current to debug it"
|
||||
s6-echo "Something wrong on stage2, please see the log at ${DESTBOOTSERV}/uncaught-logs/current to debug it"
|
||||
|
10
stage2.tini
10
stage2.tini
@@ -12,11 +12,15 @@
|
||||
# can do whatever you want with this stuff. If we meet some day, and you think
|
||||
# this stuff is worth it, you can buy me a beer in return. Eric Vidal http://obarun.org
|
||||
|
||||
s6-envdir -if /etc/s6/base-env
|
||||
importas -i -D "" DESTRCSERV DESTRCSERV
|
||||
importas -i -D "" S6CONF S6CONF
|
||||
|
||||
if { s6-echo -- "***************************************************************************" }
|
||||
if { s6-echo -- "** Start Tini shutdown **" }
|
||||
if { s6-echo -- "***************************************************************************" }
|
||||
cd /
|
||||
foreground { s6-rc -v 2 -l /run/boot-rc -da change }
|
||||
foreground { s6-rc -v 2 -l ${DESTRCSERV} -da change }
|
||||
foreground {
|
||||
backtick -n bytes { cat /proc/sys/kernel/random/poolsize }
|
||||
importas -u bytes bytes
|
||||
@@ -33,7 +37,7 @@ foreground {
|
||||
dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=$bytes
|
||||
}
|
||||
foreground {
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
s6-envdir ${S6CONF}
|
||||
importas -u -D "" HARDWARECLOCK HARDWARECLOCK
|
||||
pipeline -d { echo $HARDWARECLOCK }
|
||||
pipeline { tr A-Z a-z }
|
||||
@@ -42,7 +46,7 @@ foreground {
|
||||
hwclock --systohc --${clock}
|
||||
}
|
||||
foreground {
|
||||
s6-envdir /etc/s6/env/s6-conf
|
||||
s6-envdir ${S6CONF}
|
||||
importas -u -D "" TMPDIR TMPDIR
|
||||
if { s6-test $TMPDIR = yes }
|
||||
if { s6-echo -- Cleaning /tmp directory }
|
||||
|
Reference in New Issue
Block a user