#!/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/auth2,v 1.4 2004/07/26 17:50:21 griffon26 Exp $ depend() { need net } start() { local vicedir=$(/usr/sbin/codaconfedit server.conf vicedir) if [ ! -e "$vicedir/hostname" ] ; then eerror "Please run vice-setup before starting the service..." return 1 fi local auth2opts="" if ! [ "$(< $vicedir/hostname)" = "$(< $vicedir/db/scm)" ] ; then auth2opts="-chk" fi ebegin "Starting auth2" start-stop-daemon --start --quiet --exec /usr/sbin/auth2 \ --background -- ${auth2opts} eend $? } stop() { ebegin "Stopping auth2" start-stop-daemon --stop --quiet --exec /usr/sbin/auth2 eend $? }