diff options
author | Luca Longinotti <chtekk@gentoo.org> | 2008-07-12 22:31:41 +0000 |
---|---|---|
committer | Luca Longinotti <chtekk@gentoo.org> | 2008-07-12 22:31:41 +0000 |
commit | f5681e8fee74a17e0c5f5fd13eeeec4587ddfe40 (patch) | |
tree | 953f86d82b7f2dd6cafb74b34fd5ded60c06cfd0 /net-fs/coda/files/6.0.15 | |
parent | Version bump. (diff) | |
download | gentoo-2-f5681e8fee74a17e0c5f5fd13eeeec4587ddfe40.tar.gz gentoo-2-f5681e8fee74a17e0c5f5fd13eeeec4587ddfe40.tar.bz2 gentoo-2-f5681e8fee74a17e0c5f5fd13eeeec4587ddfe40.zip |
Move init-scripts to prepare for update from bug #193012.
(Portage version: 2.2_rc1/cvs/Linux 2.6.24-gentoo-r4 x86_64)
Diffstat (limited to 'net-fs/coda/files/6.0.15')
-rw-r--r-- | net-fs/coda/files/6.0.15/auth2 | 53 | ||||
-rw-r--r-- | net-fs/coda/files/6.0.15/coda-update | 60 | ||||
-rw-r--r-- | net-fs/coda/files/6.0.15/codasrv | 44 |
3 files changed, 157 insertions, 0 deletions
diff --git a/net-fs/coda/files/6.0.15/auth2 b/net-fs/coda/files/6.0.15/auth2 new file mode 100644 index 000000000000..9e1f3386e85d --- /dev/null +++ b/net-fs/coda/files/6.0.15/auth2 @@ -0,0 +1,53 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/files/6.0.15/auth2,v 1.1 2008/07/12 22:31:41 chtekk Exp $ + +depend() { + need net +} + +checkconfig() { + if [ ! -e $vicedir/hostname ] ; then + eerror "Please run vice-setup before starting the service..." + return 1 + fi +} + +we_are_scm() { + if [ "`cat $vicedir/hostname`" = "`cat $vicedir/db/scm`" ] ; then + return 0 + else + return 1 + fi +} + +getvicedir() { + vicedir=`/usr/sbin/codaconfedit server.conf vicedir` +} + +start() { + getvicedir + + checkconfig || return 1 + + ebegin "Starting auth2" + + # Check to see if we are the SCM. If not, we must add -chk to auth2 + + if (! we_are_scm) ; then + start-stop-daemon --start --quiet --exec /usr/sbin/auth2 \ + --background -- -chk + else + start-stop-daemon --start --quiet --exec /usr/sbin/auth2 \ + --background + fi + + eend $? +} + +stop() { + ebegin "Stopping auth2" + start-stop-daemon --stop --quiet --exec /usr/sbin/auth2 + eend $? +} diff --git a/net-fs/coda/files/6.0.15/coda-update b/net-fs/coda/files/6.0.15/coda-update new file mode 100644 index 000000000000..7d9cd34f8bf1 --- /dev/null +++ b/net-fs/coda/files/6.0.15/coda-update @@ -0,0 +1,60 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/files/6.0.15/coda-update,v 1.1 2008/07/12 22:31:41 chtekk Exp $ + +depend() { + need net auth2 +} + +checkconfig() { + if [ ! -e $vicedir/hostname ] ; then + eerror "Please run vice-setup before starting the service..." + return 1 + fi +} + +we_are_scm() { + if [ "`cat $vicedir/hostname`" = "`cat $vicedir/db/scm`" ] ; then + return 0 + else + return 1 + fi +} + +getvicedir() { + vicedir=`/usr/sbin/codaconfedit server.conf vicedir` +} + +start() { + getvicedir + + checkconfig || return 1 + + ebegin "Starting coda-update" + + # Check to see if we are the SCM. + if we_are_scm ; then + start-stop-daemon --start --quiet --exec /usr/sbin/rpc2portmap + start-stop-daemon --start --quiet --exec /usr/sbin/updatesrv + fi + + start-stop-daemon --start --quiet --exec /usr/sbin/updateclnt + + eend $? +} + +stop() { + ebegin "Stopping coda-update" + + getvicedir + + if we_are_scm ; then + start-stop-daemon --stop --quiet --exec /usr/sbin/rpc2portmap + start-stop-daemon --stop --quiet --exec /usr/sbin/updatesrv + fi + + start-stop-daemon --stop --quiet --exec /usr/sbin/updateclnt + + eend $? +} diff --git a/net-fs/coda/files/6.0.15/codasrv b/net-fs/coda/files/6.0.15/codasrv new file mode 100644 index 000000000000..7bf9fd4655a9 --- /dev/null +++ b/net-fs/coda/files/6.0.15/codasrv @@ -0,0 +1,44 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/files/6.0.15/codasrv,v 1.1 2008/07/12 22:31:41 chtekk Exp $ + +depend() { + need net coda-update auth2 +} + +checkconfig() { + if [ ! -e $vicedir/hostname ] ; then + eerror "Please run vice-setup before starting the service..." + return 1 + fi +} + +we_are_scm() { + if [ "`cat $vicedir/hostname`" = "`cat $vicedir/db/scm`" ] ; then + return 0 + else + return 1 + fi +} + +getvicedir() { + vicedir=`/usr/sbin/codaconfedit server.conf vicedir` +} + +start() { + getvicedir + + checkconfig || return 1 + + ebegin "Starting codasrv" + start-stop-daemon --start --background --exec /usr/sbin/codasrv + eend $? +} + +stop() { + ebegin "Stopping codasrv" + msg=`/usr/sbin/volutil shutdown 2>&1` || echo "$msg" + start-stop-daemon --stop --quiet --retry 30/TERM --oknodo --exec /usr/sbin/codasrv + eend $? +} |