Compare commits
25 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d2a83294e0 | ||
![]() |
a221f2dd22 | ||
![]() |
905d8f07b2 | ||
![]() |
244c0a4203 | ||
![]() |
fa04d943a6 | ||
![]() |
1758a4fe48 | ||
![]() |
22bfa5e1a5 | ||
![]() |
49d7bc3436 | ||
![]() |
615bfc18a4 | ||
![]() |
0895fd81ac | ||
![]() |
c56a5527ea | ||
![]() |
fad5c2878f | ||
![]() |
7c08fd3298 | ||
![]() |
d8ded07d97 | ||
![]() |
14255da33d | ||
![]() |
227e9634e4 | ||
![]() |
bd944a7194 | ||
![]() |
a70d048192 | ||
![]() |
33e7d5b330 | ||
![]() |
5134fa1da5 | ||
![]() |
2d95062402 | ||
![]() |
502e66ab40 | ||
![]() |
f0d29a96d4 | ||
![]() |
465df8bf18 | ||
![]() |
d13bf1f770 |
113
_s6-svc
Normal file
113
_s6-svc
Normal file
@@ -0,0 +1,113 @@
|
||||
#compdef s6-svc
|
||||
|
||||
# completion for s6-svc
|
||||
# Eric Vidal <eric@obarun.org>
|
||||
# services in /run/s6/service. Change the path variable to suit your needs.
|
||||
|
||||
path_dir=/run/s6/service
|
||||
|
||||
typeset -A opt_args
|
||||
|
||||
_path() {
|
||||
local list_dir
|
||||
list_dir=( $path_dir/* )
|
||||
compadd "$@" -a list_dir
|
||||
}
|
||||
|
||||
_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
compiled/current
Symbolic link
1
compiled/current
Symbolic link
@@ -0,0 +1 @@
|
||||
/etc/s6/compiled/default
|
BIN
compiled/default/db
Normal file
BIN
compiled/default/db
Normal file
Binary file not shown.
BIN
compiled/default/n
Normal file
BIN
compiled/default/n
Normal file
Binary file not shown.
BIN
compiled/default/resolve.cdb
Normal file
BIN
compiled/default/resolve.cdb
Normal file
Binary file not shown.
1
compiled/default/servicedirs/s6rc-fdholder/data/rules/uid/0/env/S6_FDHOLDER_LIST
vendored
Normal file
1
compiled/default/servicedirs/s6rc-fdholder/data/rules/uid/0/env/S6_FDHOLDER_LIST
vendored
Normal file
@@ -0,0 +1 @@
|
||||
|
1
compiled/default/servicedirs/s6rc-fdholder/data/rules/uid/0/env/S6_FDHOLDER_RETRIEVE_REGEX
vendored
Symbolic link
1
compiled/default/servicedirs/s6rc-fdholder/data/rules/uid/0/env/S6_FDHOLDER_RETRIEVE_REGEX
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
S6_FDHOLDER_STORE_REGEX
|
1
compiled/default/servicedirs/s6rc-fdholder/data/rules/uid/0/env/S6_FDHOLDER_SETDUMP
vendored
Normal file
1
compiled/default/servicedirs/s6rc-fdholder/data/rules/uid/0/env/S6_FDHOLDER_SETDUMP
vendored
Normal file
@@ -0,0 +1 @@
|
||||
|
1
compiled/default/servicedirs/s6rc-fdholder/data/rules/uid/0/env/S6_FDHOLDER_STORE_REGEX
vendored
Normal file
1
compiled/default/servicedirs/s6rc-fdholder/data/rules/uid/0/env/S6_FDHOLDER_STORE_REGEX
vendored
Normal file
@@ -0,0 +1 @@
|
||||
^pipe:s6rc-
|
@@ -0,0 +1 @@
|
||||
1
|
16
compiled/default/servicedirs/s6rc-fdholder/run
Executable file
16
compiled/default/servicedirs/s6rc-fdholder/run
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
pipeline -dw --
|
||||
{
|
||||
if -n --
|
||||
{
|
||||
forstdin -x 1 -- i
|
||||
exit 1
|
||||
}
|
||||
if -nt --
|
||||
{
|
||||
s6-ipcclient -l0 -- s
|
||||
/usr/libexec/s6-rc-fdholder-filler -1 --
|
||||
}
|
||||
s6-svc -t .
|
||||
}
|
||||
s6-fdholder-daemon -1 -i data/rules -- s
|
@@ -0,0 +1 @@
|
||||
3
|
8
compiled/default/servicedirs/s6rc-oneshot-runner/run
Executable file
8
compiled/default/servicedirs/s6rc-oneshot-runner/run
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
fdmove -c 2 1
|
||||
fdmove 1 3
|
||||
s6-ipcserver-socketbinder -- s
|
||||
s6-ipcserverd -1 --
|
||||
s6-ipcserver-access -v0 -E -l0 -i data/rules --
|
||||
s6-sudod -t 2000 --
|
||||
/usr/libexec/s6-rc-oneshot-run -l ../.. --
|
0
rc-serv-build/udevd-udev/run → compiled/default/servicedirs/udevd-udev/run
Normal file → Executable file
0
rc-serv-build/udevd-udev/run → compiled/default/servicedirs/udevd-udev/run
Normal file → Executable file
2
rc-serv-build/udevd-udevadm/run → compiled/default/servicedirs/udevd-udevadm/run
Normal file → Executable file
2
rc-serv-build/udevd-udevadm/run → compiled/default/servicedirs/udevd-udevadm/run
Normal file → Executable file
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
fdmove -c 2 1
|
||||
#fdmove -c 2 1
|
||||
s6-devd
|
||||
/usr/bin/udevadm settle
|
1
compiled/previous
Symbolic link
1
compiled/previous
Symbolic link
@@ -0,0 +1 @@
|
||||
/etc/s6/compiled/default
|
4
init
4
init
@@ -58,7 +58,6 @@ if {
|
||||
import -i svc-serv
|
||||
foreground {
|
||||
if { cp -a ${svc-serv} /run/s6 }
|
||||
cp -a /etc/s6/rc-serv /run/.rc-serv
|
||||
}
|
||||
|
||||
# Create symlink to /run/s6-run
|
||||
@@ -80,9 +79,10 @@ background {
|
||||
s6-setsid --
|
||||
redirfd -w 1 /run/s6-run/service/s6-svscan-log/fifo
|
||||
fdmove -c 2 1
|
||||
/etc/stage2
|
||||
/etc/s6/stage2
|
||||
}
|
||||
|
||||
unexport !
|
||||
fdmove -c 2 1
|
||||
s6-envdir -I /run/s6-run/service/.s6-svscan/
|
||||
s6-svscan -st0 /run/s6-run/service
|
||||
|
2
poweroff
2
poweroff
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec /run/s6-run/service/.s6-svscan/SIGUSR1
|
||||
exec /run/s6-run/service/.s6-svscan/SIGUSR2
|
||||
|
@@ -7,6 +7,5 @@ rofs-Udevd
|
||||
rofs-Checkfs
|
||||
rofs-modules
|
||||
rofs-swap
|
||||
rofs-loopback
|
||||
rofs-kernruntime
|
||||
|
@@ -1,4 +1,5 @@
|
||||
rwfs-fsrw
|
||||
rwfs-loopback
|
||||
rwfs-nonetwork
|
||||
rwfs-localtime
|
||||
rwfs-random
|
8
rc-serv-boot/checkfs-fscheck/up
Normal file
8
rc-serv-boot/checkfs-fscheck/up
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
fdmove -c 2 1
|
||||
# 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 {
|
||||
fsck -A -T -a
|
||||
}
|
||||
s6-true
|
2
rc-serv-boot/rofs-loopback/dependencies
Normal file
2
rc-serv-boot/rofs-loopback/dependencies
Normal file
@@ -0,0 +1,2 @@
|
||||
00
|
||||
rofs-Udevd
|
@@ -1,3 +1,4 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
|
||||
fdmove -c 2 1
|
||||
fsck -A -T -a
|
||||
ip link set up dev lo
|
2
rc-serv-boot/rwfs-random/dependencies
Normal file
2
rc-serv-boot/rwfs-random/dependencies
Normal file
@@ -0,0 +1,2 @@
|
||||
rwfs-fsrw
|
||||
|
@@ -1,3 +1,5 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
fdmove -c 2 1
|
||||
dhcpcd -B
|
||||
exec -c
|
||||
udevd
|
||||
|
4
rc-serv-boot/udevd-udevadm/run
Normal file
4
rc-serv-boot/udevd-udevadm/run
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/usr/local/bin/execlineb -P
|
||||
#fdmove -c 2 1
|
||||
s6-devd
|
||||
/usr/bin/udevadm settle
|
0
rc-serv-boot/udevd-udevrules/down
Normal file
0
rc-serv-boot/udevd-udevrules/down
Normal file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user