summaryrefslogtreecommitdiff
blob: 4fccbc6ed53f1532ca7aad27ec661d039f612df8 (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
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/rlocate/files/rlocated.rc,v 1.1 2005/12/19 23:38:11 vapier Exp $

checkconfig() {
	if [[ ! -e /proc/rlocate ]] ; then
		modprobe rlocate || return 1
	fi
	return 0
}

start() {
	checkconfig || return 1
	ebegin "Starting rlocated"
	rlocated
	eend $?
}

stop() {
	ebegin "Stopping rlocated"
	start-stop-daemon --stop --quiet --pidfile /var/run/rlocated.pid
	eend $?
}