85 Commits

Author SHA1 Message Date
obarun
ef93123fc6 fix README 2017-07-14 11:40:55 +11:00
obarun
96c517fbb6 rebuild database 2017-07-12 16:32:53 +11:00
obarun
928bcb559f separate ip6tables from iptables service 2017-07-12 16:32:21 +11:00
obarun
e2d67d7c8c rebuild the database 2017-07-12 14:01:42 +11:00
obarun
a483e72826 change output to reflect the choice on s6.conf 2017-07-12 14:00:42 +11:00
obarun
5aa4632678 remove s6-conf service and implement it on 00 service 2017-07-12 14:00:07 +11:00
obarun
c7d9be62f8 rebuild default compiled database 2017-06-21 13:06:20 +11:00
obarun
608df4bd47 replace deprecated import by importas command on rwfs-iptables/down file 2017-06-21 13:04:23 +11:00
obarun
c32cc76462 fix setfont command line 2017-06-21 13:02:54 +11:00
obarun
065c79b9ff replace absolute path by variable 2017-06-21 12:25:35 +11:00
obarun
97f13d2f1a add s6-conf file parsing as oneshot service 2017-06-21 12:25:13 +11:00
obarun
983d28ae45 replace absolute path by variable 2017-06-21 12:23:02 +11:00
obarun
1470fda317 add delay on tty to let the time to have the hostname set 2017-06-21 12:21:23 +11:00
obarun
9e41be013b reorganize environment variable 2017-06-21 12:17:55 +11:00
obarun
b53a85ef5c stage2 stage2.tini, replace absolute path by variable 2017-06-21 12:14:36 +11:00
obarun
3790871455 translate poweroff and reboot file on execlineb script 2017-06-21 12:12:34 +11:00
obarun
4aece292a1 init : replace absolute path by variable, remove s6.conf file parsing 2017-06-21 12:04:46 +11:00
obarun
ce00a75a25 rebuild default database 2017-03-28 10:05:31 +04:00
obarun
473a622f41 replace import command by importas 2017-03-28 09:58:26 +04:00
obarun
6dab7d1ff9 add lvm features 2017-03-22 19:01:59 +04:00
obarun
aa34195b53 remove rm -rf /tmp 2016-12-12 12:28:14 +04:00
obarun
15cb695a3e rebuild database 2016-12-11 11:13:56 +04:00
obarun
9aa8671c09 fix bug: rwfs-random 2016-12-11 11:13:07 +04:00
obarun
76e68327a6 start iptables before ip link 2016-12-11 11:12:44 +04:00
obarun
6f095a01e7 rebuild database 2016-12-10 21:32:52 +04:00
obarun
b5162cd430 fix bug at rwfs-cleanboot 2016-12-10 21:31:33 +04:00
obarun
95674ac04f fix bug 2016-12-10 21:30:53 +04:00
obarun
20c709697d add rwfs-tmpdir as dependencies 2016-12-10 19:56:36 +04:00
obarun
62e44763a1 typo fix 2016-12-10 19:40:12 +04:00
obarun
8b2f67c2bd change boot-serv file to BOOTSERV 2016-12-10 19:39:45 +04:00
obarun
4db28f92ad change boot-serv variable to BOOTSERV 2016-12-10 19:38:42 +04:00
obarun
e994d4f8e0 typo fix 2016-12-10 19:38:00 +04:00
obarun
6679703194 add TMPDIR features onto s6.conf 2016-12-10 09:50:14 +04:00
obarun
5a5798e699 typo fix 2016-12-10 09:49:45 +04:00
obarun
4c4aa196a3 rebuild db according to the change of boot-rc-serv 2016-12-09 21:17:38 +04:00
obarun
59103805ae clean the /tmp directory 2016-12-09 21:01:05 +04:00
obarun
629e2a2693 typo fix 2016-12-09 21:00:40 +04:00
obarun
730c47503d typo fix 2016-12-09 21:00:15 +04:00
obarun
4a2ce7486b add rwfs-tmpdir oneshot service : this is create the /tmp directory 2016-12-09 20:59:52 +04:00
obarun
4b516a60a3 change import by importas to avoid conflict with imagemagick's import binary 2016-12-09 20:59:00 +04:00
Eric Vidal
3ede7a7e1a ooops 2016-06-16 09:19:16 +04:00
Eric Vidal
ecf880bbba separate classic and rc service, change location of compiled database for user 2016-06-16 09:16:38 +04:00
Eric Vidal
e078f81833 rename variable boot-serv 2016-06-16 09:11:31 +04:00
Eric Vidal
2da29b1f89 add s6.local script 2016-06-16 09:10:03 +04:00
Eric Vidal
2229c16ccb rebuild database according to the change of boot-rc-serv 2016-06-16 09:08:47 +04:00
Eric Vidal
a973077e7c rename rc service for boot, separate boot service and user service, add new features, rename directory for better clarity 2016-06-16 09:07:44 +04:00
Eric Vidal
c1462043c4 rename service directory for boot to better clarity 2016-06-16 09:06:13 +04:00
Eric Vidal
8f488f90c2 add s6.local features 2016-06-16 08:59:12 +04:00
Eric Vidal
5b60188bd1 change poweroff, shutdown, reboot script according to the new location of .s6-svscan 2016-06-16 08:58:45 +04:00
Eric Vidal
6467aa9404 change database location with -l option 2016-06-16 08:57:22 +04:00
Eric Vidal
ac5d797b7f change database initiation with -l option 2016-06-16 08:56:40 +04:00
Eric Vidal
1360a70b56 remove symlinks,use directly the copy of boot-serv variable 2016-06-16 08:55:50 +04:00
Eric Vidal
46e69c496d change completion according to the new directory for service 2016-06-16 08:54:24 +04:00
Eric Vidal
22f0fca0fd build default database 2016-06-10 09:10:33 +04:00
Eric Vidal
069c32c3c1 allow forcecheck if asked 2016-06-10 09:10:03 +04:00
Eric Vidal
36cf18ab0f add iptables features and fscheck options 2016-06-10 09:09:16 +04:00
Eric Vidal
be97f38a80 add iptables oneshot at boot time 2016-06-10 09:08:44 +04:00
Eric Vidal
1b297934a6 dmesg must be the last oneshot started before switching to bundle all-User 2016-06-10 09:08:04 +04:00
Eric Vidal
230d30ff1a clean /tmp directory at shutdown 2016-06-10 09:06:29 +04:00
Eric Vidal
8a2027df08 classify the compilation database source directory 2016-06-07 17:50:44 +04:00
Eric Vidal
d2a83294e0 fix obscur bug about ip link 2016-06-06 17:19:58 +04:00
Eric Vidal
a221f2dd22 grrr 2016-06-04 21:20:02 +04:00
Eric Vidal
905d8f07b2 add shutdown script 2016-06-04 16:15:43 +04:00
Eric Vidal
244c0a4203 change path for stage2, stage3 2016-06-04 09:36:00 +04:00
Eric Vidal
fa04d943a6 rebuild database 2016-06-03 22:10:36 +04:00
Eric Vidal
1758a4fe48 fix dependencies for rofs-hardclock 2016-06-03 22:10:02 +04:00
Eric Vidal
22bfa5e1a5 build again default database to follow the change 2016-06-02 18:21:07 +04:00
Eric Vidal
49d7bc3436 bring up after udevd 2016-06-02 18:20:36 +04:00
Eric Vidal
615bfc18a4 always exit with success to avoids crash if a check is made 2016-06-02 18:19:44 +04:00
Eric Vidal
0895fd81ac remove pipe for log entry on udevd udevadm 2016-05-31 20:15:47 +04:00
Eric Vidal
c56a5527ea provide a default database 2016-05-31 17:38:22 +04:00
Eric Vidal
fad5c2878f change place of compiled database for s6-rc, using current as symlink allow to change database on running time without changing the init and stage2 script 2016-05-31 17:37:56 +04:00
Eric Vidal
7c08fd3298 add directory for user service 2016-05-26 21:09:03 +04:00
Eric Vidal
d8ded07d97 rename boot service directory 2016-05-26 21:08:38 +04:00
Eric Vidal
14255da33d change origin of database 2016-05-26 21:05:35 +04:00
Eric Vidal
227e9634e4 oops 2016-05-25 13:16:18 +04:00
Eric Vidal
bd944a7194 improve s6-svc zsh completion 2016-05-25 13:15:09 +04:00
Eric Vidal
a70d048192 improve completion for s6-svc 2016-05-24 21:38:50 +04:00
Eric Vidal
33e7d5b330 fix bug about supervision control 2016-05-23 20:10:50 +04:00
Eric Vidal
5134fa1da5 oops 2016-05-23 13:12:54 +04:00
Eric Vidal
2d95062402 add zsh completion for s6-svc 2016-05-23 13:10:28 +04:00
Eric Vidal
502e66ab40 add log for divers service 2016-05-19 18:42:36 +04:00
Eric Vidal
f0d29a96d4 change command for divers Signal 2016-05-19 18:39:17 +04:00
Eric Vidal
465df8bf18 load environment for svscan 2016-05-19 18:38:21 +04:00
Eric Vidal
d13bf1f770 call SIGUSR2 instead of SIGUSR1 2016-05-19 18:37:21 +04:00
245 changed files with 848 additions and 358 deletions

View File

@@ -1,3 +1,4 @@
# s6-boot # s6-boot
Boot files for s6 Boot files for s6
UNDER DEVELOPMENT, DO NOT USE FOR PRODUCTION For instructions about S6 supervision suite : http://skarnet.org/software/

115
_s6-svc Normal file
View File

@@ -0,0 +1,115 @@
#compdef s6-svc
# completion for s6-svc
# Copyright (C) 2015-2017 Eric Vidal <eric@obarun.org>
# services in /run/s6/service. Change the path variable to suit your needs.
path_dir_boot=/run/boot/service
path_dir_user=/run/user/service
typeset -A opt_args
_path() {
local list_dir
list_dir_boot=( $path_dir_boot/* )
list_dir_user=( $path_dir_user/* )
compadd "$@" -a list_dir_boot list_dir_user
}
_list_common=(
'-a[send a SIGALRM to the supervised process]'
'-b[send a SIGABRT to the supervised process]'
'-q[send a SIGQUIT to the supervised process]'
'-h[send a SIGHUP to the supervised process]'
'-k[send a SIGKILL to the supervised process]'
'-t[send a SIGTERM to the supervised process]'
'-i[send a SIGINT to the supervised process]'
'-1[send a SIGUSR1 to the supervised process]'
'-2[send a SIGUSR2 to the supervised process]'
'-p[send a SIGSTOP to the supervised process]'
'-c[send a SIGCONT to the supervised process]'
'-y[send a SIGWINCH to the supervised process]'
'-o[once. Equivalent to -uO]'
'-d[down]'
'-u[up]'
'-x[exit]'
'-X[close fds and exit]'
'-O[Once at most. Do not restart when it dies]'
'-T[timeout]'
)
_list_special=(
'-wd[s6-svc will not exit until the service is down]'
'-wD[s6-svc will not exit until the service is down and ready to be brought up]'
'-wu[s6-svc will not exit until the service is up]'
'-wU[s6-svc will not exit until the service is up and ready]'
'-wr[s6-svc will not exit until the service has been started or restarted]'
'-wR[same as -wr but need to be notified readiness]'
)
_svc_action_none() {
_arguments \
"$_list_common[@]" \
"$_list_special[@]"
}
_svc() {
local context line i
typeset -A opt_args
case $words[CURRENT] in
*wd*|*wD*|*wu*|*wU*|*wr*|*wR*)
_arguments -s : \
"$_list_common[@]" \
"$_list_special[@]" \
'*:service:_path'
;;
*a*|*b*|*q*|*h*|*k*|*t*|*i*|*1*|*2*|*p*|*c*|*y*|*o*|*d*|*u*|*x*|*X*|*O*)
if [[ $words[CURRENT] == -*T ]]; then
_arguments : \
':\if the -wstate option has been given, -T specifies a timeout in milliseconds: ' \
'*:service:_path'
else
_arguments -s : \
"$_list_common[@]" \
"$_list_special[@]" \
'*:service:_path'
fi
;;
-T)
_arguments -s : \
':if the -wstate option has been given, -T specifies a timeout in milliseconds: ' \
'*:service:_path'
;;
*) i=$#;
while [[ $words[$i] != "s6-svc" ]];do
if [[ $words[$i] == -* ]]; then
break
else
i=$(($i-1))
fi
done
case $i in
-*)
if [[ $words[$i] != "s6-svc" ]]; then
_arguments -s : \
"$_list_common[@]" \
"$_list_special[@]" \
'*:service:_path'
else
_message "enter a - character to begin the completion"
fi
;;
*)
_svc_action_none
;;
esac
;;
esac
}
_svc "$@"

1
base-env/DESTBOOTSERV Normal file
View File

@@ -0,0 +1 @@
/run/boot

1
base-env/DESTRCSERV Normal file
View File

@@ -0,0 +1 @@
/run/boot-rc

1
base-env/S6CONF Normal file
View File

@@ -0,0 +1 @@
/run/s6-conf

1
base-env/SRCBOOTSERV Normal file
View File

@@ -0,0 +1 @@
/etc/s6/boot-serv

1
base-env/SRCRCCOMPILED Normal file
View File

@@ -0,0 +1 @@
/etc/s6/compiled

1
base-env/SRCRCSERV Normal file
View File

@@ -0,0 +1 @@
/etc/s6/boot-rc-serv

75
boot-rc-serv/00/up Normal file
View File

@@ -0,0 +1,75 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
if { s6-echo -- 00 started }
foreground { if { s6-echo -- Mounting filesystem }
# mount proc sys dev run if doesn't exist
foreground {
forx -p first { proc sys dev run }
importas -ui -D "" first first
foreground {
if -n { mountpoint -q /$first }
s6-envdir /etc/s6/filesystem-env/$first
importas -ui -D "" fstype fstype
importas -ui -D "" device device
importas -ui -D "" mountpoint mountpoint
importas -ui -D "" options options
s6-mount -o $options -t $fstype $device $mountpoint
}
}
# create needed directory on run if doesn't exist
if {
forx -p second { lvm user lock }
importas -ui -D "" second second
foreground {
if -n { s6-test -d /run/$second }
s6-mkdir -p -m 0755 /run/$second
}
}
# finaly mount /dev/shm /dev/pts
if {
forx -p third { shm pts }
importas -ui -D "" third third
if {
foreground {
if -n { mountpoint -q /dev/$third }
if { s6-mkdir -p -m 0755 /dev/$third }
s6-envdir /etc/s6/filesystem-env/$third
importas -ui -D "" fstype fstype
importas -ui -D "" device device
importas -ui -D "" mountpoint mountpoint
importas -ui -D "" options options
s6-mount -o $options -n -t $fstype $device $mountpoint
}
}
}
s6-echo -- filesystem was mounted successfully
}
foreground {
s6-envdir -if /etc/s6/base-env
importas -i -D "" S6CONF S6CONF
if { s6-echo -- Parsing s6-conf }
# 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 was parsed successfully
}
s6-echo -- 00 successfully started

View File

@@ -0,0 +1,3 @@
00
all-Boot
all-Switch

View File

@@ -0,0 +1,3 @@
switch-ready
switch-svscan
switch-user

View File

@@ -1,4 +1,3 @@
00
rofs-cgroups rofs-cgroups
rofs-kernmod rofs-kernmod
rofs-console rofs-console
@@ -7,6 +6,5 @@ rofs-Udevd
rofs-Checkfs rofs-Checkfs
rofs-modules rofs-modules
rofs-swap rofs-swap
rofs-loopback
rofs-kernruntime rofs-kernruntime

View File

@@ -0,0 +1,12 @@
rwfs-fsrw
rwfs-tmpdir
rwfs-loopback
rwfs-iptables
rwfs-ip6tables
rwfs-nonetwork
rwfs-localtime
rwfs-random
rwfs-cleanboot
rwfs-end
rwfs-dmesglog
rwfs-s6local

View File

@@ -0,0 +1,14 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir -if /etc/s6/base-env
importas -i -D "" S6CONF S6CONF
s6-envdir ${S6CONF}
importas -D "" USEBTRFS USEBTRFS
ifelse -X { s6-test $USEBTRFS = yes }
{
if { s6-test -x /usr/bin/btrfs }
if { s6-echo -- checkfs-brtfs started }
foreground { btrfs device scan }
s6-echo -- checkfs-brtfs successfully started
}
s6-echo -- checkfs-brtfs desactived

View File

@@ -0,0 +1,14 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir -if /etc/s6/base-env
importas -i -D "" S6CONF S6CONF
s6-envdir ${S6CONF}
importas -D "" USEDMRAID USEDMRAID
ifelse -X { s6-test $USEDMRAID = yes }
{
if { s6-test -x /usr/bin/dmraid }
if { s6-echo -- checkfs-dmraid started }
foreground { dmraid -i -ay }
s6-echo -- checkfs-dmraid successfully started
}
s6-echo -- checkfs-dmraid desactived

View File

@@ -1,3 +1,4 @@
rofs-Udevd rofs-Udevd
checkfs-dmraid checkfs-dmraid
checkfs-btrfs checkfs-btrfs
checkfs-lvm

View File

@@ -0,0 +1,21 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir -if /etc/s6/base-env
importas -i -D "" S6CONF S6CONF
s6-envdir ${S6CONF}
importas -D "" FORCECHCK FORCECHCK
ifelse -X { s6-test $FORCECHCK = yes }
{
redirfd -w 1 /dev/console
if { s6-echo -- Check of filesystem was asked, please wait }
foreground { fsck -A -T -a -f noopts=_netdev }
s6-echo -- Filesystem checked
}
# if partition is checked, fsck return a fail exit
# and a crash occurs, so whatever happens with fsck, the output need to be a success
if -t {
if { s6-echo -- checkfs-fsckeck started }
fsck -A -T -a noopts=_netdev
}
s6-echo -- checkfs-fscheck successfully started

View File

@@ -0,0 +1 @@
rofs-Udevd

View File

@@ -0,0 +1,22 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir -if /etc/s6/base-env
importas -i -D "" S6CONF S6CONF
s6-envdir ${S6CONF}
importas -D "" USELVM USELVM
ifelse -X { s6-test $USELVM = yes }
{
if { s6-echo -- checkfs-lvm started }
foreground {
if -nt { s6-test -d /run/lvm }
s6-mkdir /run/lvm
}
if { /usr/bin/lvmetad -p /run/lvm/lvmetad.pid }
foreground {
if { /usr/bin/vgscan }
/usr/bin/vgchange -ay
}
foreground { pkill lvmetad }
s6-echo -- lvm-prepare successfully started
}
s6-echo -- lvm-prepare desactived

View File

@@ -1,3 +1,4 @@
checkfs-dmraid checkfs-dmraid
checkfs-btrfs checkfs-btrfs
checkfs-lvm
checkfs-fscheck checkfs-fscheck

View File

@@ -7,7 +7,7 @@ foreground {
pipeline { s6-cut -d"\t" -f1 } pipeline { s6-cut -d"\t" -f1 }
pipeline { s6-grep -vF -- devices } pipeline { s6-grep -vF -- devices }
forstdin -d"\n" -- i forstdin -d"\n" -- i
import -u i importas -u -D "" i i
if { mountpoint -q /sys/fs/cgroup/${i} } if { mountpoint -q /sys/fs/cgroup/${i} }
umount -R /sys/fs/cgroup/${i} umount -R /sys/fs/cgroup/${i}
} }

View File

@@ -0,0 +1,24 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir -if /etc/s6/base-env
importas -i -D "" S6CONF S6CONF
s6-envdir ${S6CONF}
importas -D "" CGROUPS CGROUPS
ifelse -X { s6-test $CGROUPS = yes }
{
foreground {
if { s6-echo -- rofs-cgroups started }
if { mkdir -p -m 0755 /sys/fs/cgroup }
if { s6-mount -wt tmpfs cgroup /sys/fs/cgroup }
redirfd -r 0 /proc/cgroups
pipeline { s6-tail -n +2 }
pipeline { s6-cut -d"\t" -f1 }
pipeline { s6-grep -vF -- devices }
forstdin -d"\n" -- i
importas -u -D "" i i
if { s6-mkdir /sys/fs/cgroup/${i} }
foreground { s6-mount -t cgroup -o ${i} -- cgroup /sys/fs/cgroup/${i} }
}
s6-echo -- rofs-cgroups successfully started
}
s6-echo -- rofs-cgroups desactived

View File

@@ -1 +1,2 @@
rofs-kernmod rofs-kernmod
rofs-Udevd

View File

@@ -0,0 +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 ${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
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

View File

@@ -0,0 +1,16 @@
#!/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 ${S6CONF}
importas -D "" TZ TZ
importas -D "" HARDWARECLOCK HARDWARECLOCK
pipeline -d { echo $HARDWARECLOCK }
pipeline { tr A-Z a-z }
forstdin -- clock
importas -iu -D "" clock clock
hwclock --systz --${clock} --noadjfile
}
s6-echo -- rofs-hardclock successfully started

View File

@@ -0,0 +1,14 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
if { s6-echo -- rofs-kermod started }
foreground {
pipeline -d { kmod static-nodes }
pipeline { s6-grep -F -- Module: }
pipeline { s6-cut -d":" -f2 }
pipeline { s6-cut -d" " -f2 }
forstdin -d"\n" -- mod
importas -iu -D "" mod mod
modprobe $mod
}
s6-echo -- rofs-kermod successfully started

View File

@@ -0,0 +1,15 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir -if /etc/s6/base-env
importas -i -D "" S6CONF S6CONF
s6-envdir ${S6CONF}
importas -D "" KERNELRUNTIME KERNELRUNTIME
ifelse -X { s6-test $KERNELRUNTIME = yes }
{
if { s6-test -x /usr/bin/sysctl }
if { s6-test -e /etc/sysctl.conf }
if { s6-echo -- rofs-kernruntime started }
foreground { sysctl -p /etc/sysctl.conf }
s6-echo -- rofs-kernruntime successfully started
}
s6-echo -- rofs-kernruntime desactived

View File

@@ -0,0 +1,17 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir -if /etc/s6/base-env
importas -i -D "" S6CONF S6CONF
ifelse -X { s6-test -e ${S6CONF}/MODULES }
{
if { s6-echo -- rofs-modules started }
redirfd -r 0 ${S6CONF}/MODULES
forstdin -n -- mods
importas -ui -D "" mods mods
foreground {
if { s6-test -n $mods }
modprobe -ab $mods
}
s6-echo -- rofs-modules successfully started
}
s6-echo -- rofs-modules desactived

13
boot-rc-serv/rofs-swap/up Normal file
View File

@@ -0,0 +1,13 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir -if /etc/s6/base-env
importas -i -D "" S6CONF S6CONF
s6-envdir ${S6CONF}
importas -D "" USESWAP USESWAP
ifelse -X { s6-test $USESWAP = yes }
{
if { s6-echo -- rofs-swap started }
foreground { swapon -a }
s6-echo -- rofs-swap successfully started
}
s6-echo -- rofs-swap desactived

View File

@@ -0,0 +1,2 @@
rwfs-fsrw
rwfs-tmpdir

View File

@@ -0,0 +1,19 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
if { s6-echo -- rwfs-cleanboot started }
if -t {
foreground { install -m0664 -o root -g utmp /dev/null /run/utmp }
}
if -t {
if -nt { s6-test -e /var/log/wtmp }
foreground { install -m0664 -o root -g utmp /dev/null /var/log/wtmp }
}
if -t {
if -nt { s6-test -e /var/log/btmp }
foreground { install -m0600 -o root -g utmp /dev/null /var/log/btmp }
}
if -t {
foreground { install -dm1777 /tmp/.X11-unix /tmp/.ICE-unix }
}
s6-echo -- rwfs-cleanboot successfully started

View File

@@ -0,0 +1 @@
rwfs-end

View File

@@ -0,0 +1,8 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
if { s6-echo -- rwfs-dmesglog started }
foreground {
redirfd -w 1 /var/log/dmesg.log
dmesg
}
s6-echo -- rwfs-dmesglog successfully started

View File

@@ -1,6 +1,7 @@
rwfs-fsrw rwfs-fsrw
rwfs-loopback
rwfs-iptables
rwfs-nonetwork rwfs-nonetwork
rwfs-localtime rwfs-localtime
rwfs-random rwfs-random
rwfs-cleanboot rwfs-cleanboot
rwfs-dmesglog

View File

@@ -0,0 +1,5 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
if { s6-echo -- rwfs-fsrw started }
if { s6-mount -o remount,rw / / }
s6-echo -- rwfs-fsrw successfully started

View File

@@ -0,0 +1,13 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir -if /etc/s6/base-env
importas -i -D "" S6CONF S6CONF
s6-envdir ${S6CONF}
importas -i -D "" IP6TABLES IP6TABLES
if { s6-test $IP6TABLES = yes }
foreground {
if { s6-echo -- Flushing ip6tables }
/usr/lib/iptables/scripts/iptables-flush 6
}
s6-echo -- Ip6tables flushed

View File

@@ -0,0 +1,15 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir -if /etc/s6/base-env
importas -i -D "" S6CONF S6CONF
s6-envdir ${S6CONF}
importas -D "" IP6TABLES IP6TABLES
ifelse -X { s6-test $IP6TABLES = yes }
{
if { s6-test -e /etc/iptables/ip6tables.rules }
if { s6-echo -- Activing ip6tables }
foreground { ip6tables-restore /etc/iptables/ip6tables.rules }
s6-echo -- Ip6tables actived
}
s6-echo -- rwfs-ip6tables desactived

View File

@@ -0,0 +1,13 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir -if /etc/s6/base-env
importas -i -D "" S6CONF S6CONF
s6-envdir ${S6CONF}
importas -i -D "" IPTABLES IPTABLES
if { s6-test $IPTABLES = yes }
foreground {
if { s6-echo -- Flushing iptables }
/usr/lib/iptables/scripts/iptables-flush
}
s6-echo -- Iptables flushed

View File

@@ -0,0 +1,15 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
s6-envdir -if /etc/s6/base-env
importas -i -D "" S6CONF S6CONF
s6-envdir ${S6CONF}
importas -D "" IPTABLES IPTABLES
ifelse -X { s6-test $IPTABLES = yes }
{
if { s6-test -e /etc/iptables/iptables.rules }
if { s6-echo -- Activing iptables }
foreground { iptables-restore /etc/iptables/iptables.rules }
s6-echo -- Iptables actived
}
s6-echo -- rwfs-iptables desactived

View File

@@ -0,0 +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 ${S6CONF}
importas -D "" TZ TZ
if { s6-ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime }
s6-echo -- rwfs-localtime successfully started

View File

@@ -0,0 +1,2 @@
rwfs-fsrw
rwfs-iptables

View File

@@ -0,0 +1 @@
oneshot

View File

@@ -0,0 +1,6 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
if { s6-echo -- rwfs-loopback started }
if { ip link set up dev lo }
s6-echo -- rwfs-loopback successfully started

View File

@@ -0,0 +1 @@
oneshot

View File

@@ -0,0 +1,6 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
if { s6-echo -- rwfs-nonetwork started }
if { mount -a -t "nosysfs,nonfs,nonfs4,nosmbfs,nocifs" -O no_netdev }
s6-echo -- rwfs-nonetwork successfully started

View File

@@ -0,0 +1,2 @@
rwfs-fsrw

View File

@@ -0,0 +1 @@
oneshot

View File

@@ -1,23 +1,22 @@
#!/usr/local/bin/execlineb -P #!/usr/local/bin/execlineb -P
fdmove -c 2 1 fdmove -c 2 1
if { s6-echo -- rwfs-random started }
foreground { foreground {
cp /var/lib/random-seed /dev/urandom cp /var/lib/random-seed /dev/urandom
} }
backtick -n bytes { cat /proc/sys/kernel/random/poolsize } backtick -n bytes { cat /proc/sys/kernel/random/poolsize }
import -u bytes importas -u -D "" bytes bytes
if -t { if -t {
foreground { foreground {
if { s6-test -z $bytes } if { s6-test -z $bytes }
define defbytes 512 define defbytes 512
umask 077 umask 077
dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=$defbytes dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=$defbytes
} }
true s6-true
} }
umask 077
umask 077 foreground { dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=$bytes }
redirfd -w 1 /dev/null s6-echo -- rwfs-random successfully started
dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=$bytes

View File

@@ -0,0 +1 @@
rwfs-dmesglog

View File

@@ -0,0 +1 @@
oneshot

View File

@@ -0,0 +1,9 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
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 }
s6-echo -- s6.local desactived

View File

@@ -0,0 +1 @@
oneshot

View File

@@ -0,0 +1,10 @@
#!/usr/local/bin/execlineb -P
fdmove -c 2 1
if { s6-echo -- rwfs-tmpdir started }
foreground {
if { s6-echo -- Create /tmp directory }
mkdir -p -m1777 /tmp
}
s6-echo -- rwfs-tmpdir successfully started

View File

@@ -0,0 +1 @@
all-Boot

Some files were not shown because too many files have changed in this diff Show More