diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-util/schroot/files/schroot.initd |
reinit the tree, so we can have metadata
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" +} |