diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-util/schroot/files/schroot.initd | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-util/schroot/files/schroot.initd')
-rw-r--r-- | dev-util/schroot/files/schroot.initd | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/dev-util/schroot/files/schroot.initd b/dev-util/schroot/files/schroot.initd new file mode 100644 index 000000000000..be58c3a0f2d0 --- /dev/null +++ b/dev-util/schroot/files/schroot.initd @@ -0,0 +1,41 @@ +#!/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" +} |