* [gentoo-commits] gentoo-x86 commit in dev-util/schroot/files: schroot.initd
@ 2009-11-18 9:56 Jonathan Callen (abcd)
0 siblings, 0 replies; only message in thread
From: Jonathan Callen (abcd) @ 2009-11-18 9:56 UTC (permalink / raw
To: gentoo-commits
abcd 09/11/18 09:56:05
Modified: schroot.initd
Log:
fix init script, revbump
Revision Changes Path
1.2 dev-util/schroot/files/schroot.initd
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/schroot/files/schroot.initd?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/schroot/files/schroot.initd?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/schroot/files/schroot.initd?r1=1.1&r2=1.2
Index: schroot.initd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-util/schroot/files/schroot.initd,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- schroot.initd 11 Sep 2009 07:16:29 -0000 1.1
+++ schroot.initd 18 Nov 2009 09:56:05 -0000 1.2
@@ -5,33 +5,32 @@
after net netmount
}
-recover_sessions() {
- einfo "Recovering 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 --recover-session
- eend $?
- done
- else
- einfo "(none)"
- fi
- eoutdent
- einfo "...done"
-}
+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
-end_sessions() {
- einfo "Ending schroot sessions"
+ einfo "$msg schroot sessions"
eindent
local chroot
local chroots="$(schroot --all-sessions --list --quiet)"
- if [ -n "${chroots}" ]; then
- for chroot in ${chroots}; do
+ if [ -n "$chroots" ]; then
+ for chroot in $chroots; do
ebegin "$chroot"
- schroot --chroot=$chroot --recover-session
+ schroot --chroot=$chroot $param
eend $?
done
else
@@ -40,11 +39,3 @@
eoutdent
einfo "...done"
}
-
-start() {
- if [ "${SESSIONS_RECOVER}" = "end" ]; then
- end_sessions
- else
- recover_sessions
- fi
-}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-11-18 9:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-18 9:56 [gentoo-commits] gentoo-x86 commit in dev-util/schroot/files: schroot.initd Jonathan Callen (abcd)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox