diff options
author | Maurice van der Pot <griffon26@gentoo.org> | 2004-07-26 17:50:21 +0000 |
---|---|---|
committer | Maurice van der Pot <griffon26@gentoo.org> | 2004-07-26 17:50:21 +0000 |
commit | f4e6dd5971e7c74862925c59a69110b76b774985 (patch) | |
tree | 2232a8fcf5dc921a3885c1bb2709c60e0aa128bb /net-fs/coda/files/coda-update | |
parent | added in mailx virtual for bug #58164 (diff) | |
download | gentoo-2-f4e6dd5971e7c74862925c59a69110b76b774985.tar.gz gentoo-2-f4e6dd5971e7c74862925c59a69110b76b774985.tar.bz2 gentoo-2-f4e6dd5971e7c74862925c59a69110b76b774985.zip |
Fixed several issues in coda init scripts (see bug #26132)
Diffstat (limited to 'net-fs/coda/files/coda-update')
-rw-r--r-- | net-fs/coda/files/coda-update | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/net-fs/coda/files/coda-update b/net-fs/coda/files/coda-update index c059f96a26cb..9e6276f72b51 100644 --- a/net-fs/coda/files/coda-update +++ b/net-fs/coda/files/coda-update @@ -1,12 +1,19 @@ #!/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/coda-update,v 1.3 2004/07/16 23:22:03 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/files/coda-update,v 1.4 2004/07/26 17:50:21 griffon26 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 @@ -15,23 +22,16 @@ we_are_scm() { fi } -checkconfig() { - - if [ ! -e /etc/coda/server.conf ] ; then - eerror "Please run vice-setup before starting the service..." - return 1 - fi - eval `grep "^vicedir=" /etc/coda/server.conf || echo vicedir=/var/lib/vice` - if [ ! -e $vicedir/hostname ] ; then - eerror "Please run vice-setup before starting the service..." - return 1 - fi +getvicedir() { + vicedir=`/usr/sbin/codaconfedit server.conf vicedir` } start() { + getvicedir + checkconfig || return 1 - ebegin "Starting coda update servers" + ebegin "Starting coda-update" # Check to see if we are the SCM. if we_are_scm ; then @@ -47,6 +47,8 @@ start() { 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 |