forked from artix/artools
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
6721a997bd | |||
6da82fb56b |
@@ -34,16 +34,15 @@ add_svc_runit(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
add_svc_s6(){
|
add_svc_s6(){
|
||||||
local mnt="$1" names="$2" valid="" rlvl="${3:-default}"
|
local mnt="$1" names="$2" rlvl="${3:-default}"
|
||||||
for svc in $names; do
|
for svc in $names; do
|
||||||
error=false
|
error=false
|
||||||
chroot $mnt s6-rc-db -c /etc/s6/rc/compiled type $svc &> /dev/null || error=true
|
chroot $mnt s6-rc-db -c /etc/s6/rc/compiled type $svc &> /dev/null || error=true
|
||||||
if [ $? == 0 ] && [[ $error == false ]]; then
|
if [ $? == 0 ] && [[ $error == false ]]; then
|
||||||
msg2 "Setting %s ..." "$svc"
|
msg2 "Setting %s ..." "$svc"
|
||||||
valid=${valid:-}${valid:+' '}${svc}
|
chroot $mnt s6-rc-bundle-update -c /etc/s6/rc/compiled add $rlvl $svc
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
chroot $mnt s6-rc-bundle -c /etc/s6/rc/compiled add $rlvl $valid
|
|
||||||
|
|
||||||
# rebuild s6-linux-init binaries
|
# rebuild s6-linux-init binaries
|
||||||
chroot $mnt rm -r /etc/s6/current
|
chroot $mnt rm -r /etc/s6/current
|
||||||
|
Reference in New Issue
Block a user