blob: f7654074e82f247348e146126c0a2ce7a587d011 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/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.2 2004/07/14 23:33:59 agriffis Exp $
depend() {
need net
}
checkconfig() {
if [ ! -e /var/lib/vice/hostname ] ; then
eerror "Please set up vice before starting the service..."
return 1
fi
}
we_are_scm() {
if [ "`cat /var/lib/vice/hostname`" = "`cat /var/lib/vice/db/scm`" ] ; then
return 0
else
return 1
fi
}
start() {
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 $?
}
|