From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NAhGi-0004CG-Ee for garchives@archives.gentoo.org; Wed, 18 Nov 2009 09:56:09 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CC430E094A; Wed, 18 Nov 2009 09:56:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A1FCBE094A for ; Wed, 18 Nov 2009 09:56:06 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 414E367539 for ; Wed, 18 Nov 2009 09:56:06 +0000 (UTC) Received: from abcd by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1NAhGf-0002H1-Go for gentoo-commits@lists.gentoo.org; Wed, 18 Nov 2009 09:56:05 +0000 From: "Jonathan Callen (abcd)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, abcd@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in dev-util/schroot/files: schroot.initd X-VCS-Repository: gentoo-x86 X-VCS-Files: schroot.initd X-VCS-Directories: dev-util/schroot/files X-VCS-Committer: abcd X-VCS-Committer-Name: Jonathan Callen Content-Type: text/plain; charset=utf8 Message-Id: Sender: Jonathan Callen Date: Wed, 18 Nov 2009 09:56:05 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: ed68e89f-0413-42ec-a660-4b171867bada X-Archives-Hash: 8245a6d97f3f4639157de17242a006cd 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/f= iles/schroot.initd?rev=3D1.2&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/schroot/f= iles/schroot.initd?rev=3D1.2&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/schroot/f= iles/schroot.initd?r1=3D1.1&r2=3D1.2 Index: schroot.initd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 } =20 -recover_sessions() { - einfo "Recovering schroot sessions" - eindent - local chroot - local chroots=3D"$(schroot --all-sessions --list --quiet)" - if [ -n "${chroots}" ]; then - for chroot in ${chroots}; do - ebegin "$chroot" - schroot --chroot=3D$chroot --recover-session - eend $? - done - else - einfo "(none)" - fi - eoutdent - einfo "...done" -} +start() { + local msg param + case "${SESSIONS_RECOVER}" in + end) + msg=3D"Ending" + param=3D"--end-session" + ;; + recover|"") + msg=3D"Recovering" + param=3D"--recover-session" + ;; + *) + ewarn "Invalid value \"$SESSIONS_RECOVER\" for \$SESSIONS_RECOVER, us= ing \"recover\"" + msg=3D"Recovering" + param=3D"--recover-session" + ;; + esac =20 -end_sessions() { - einfo "Ending schroot sessions" + einfo "$msg schroot sessions" eindent local chroot local chroots=3D"$(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=3D$chroot --recover-session + schroot --chroot=3D$chroot $param eend $? done else @@ -40,11 +39,3 @@ eoutdent einfo "...done" } - -start() { - if [ "${SESSIONS_RECOVER}" =3D "end" ]; then - end_sessions - else - recover_sessions - fi -}