#!/sbin/runscript # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/app-admin/fam-oss/files/fam,v 1.5 2003/02/14 22:01:30 vapier Exp $ depend() { need net auth2 } we_are_scm() { if [ "`cat /vice/hostname`" = "`cat /vice/db/scm`" ] ; then return 0 else return 1 fi } checkconfig() { if [ ! -e /vice/hostname ] ; then eerror "Please set up coda before starting the service..." return 1 fi } start() { checkconfig || return 1 ebegin "Starting coda update servers" # 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" 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 $? }