You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-util/schroot/files/schroot.initd

42 lines
706 B

#!/sbin/openrc-run
depend() {
need localmount
after net netmount
}
start() {
local msg param
case "${SESSIONS_RECOVER}" in
end)
msg="Ending"
param="--end-session"
;;
recover|"")
msg="Recovering"
param="--recover-session"
;;
*)
ewarn "Invalid value \"$SESSIONS_RECOVER\" for \$SESSIONS_RECOVER, using \"recover\""
msg="Recovering"
param="--recover-session"
;;
esac
einfo "$msg schroot sessions"
eindent
local chroot
local chroots="$(schroot --all-sessions --list --quiet)"
if [ -n "$chroots" ]; then
for chroot in $chroots; do
ebegin "$chroot"
schroot --chroot=$chroot $param
eend $?
done
else
einfo "(none)"
fi
eoutdent
einfo "...done"
}