summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-04-18 22:37:21 +0000
committerMike Frysinger <vapier@gentoo.org>2006-04-18 22:37:21 +0000
commit826e65c0f5a0ee9ce497a354fb9093d4161c553c (patch)
treea600ec22e0c8efcdd5340a0f1e0fe89b6733620c /sys-apps/rlocate
parentChange var name to respect standards. (diff)
downloadgentoo-2-826e65c0f5a0ee9ce497a354fb9093d4161c553c.tar.gz
gentoo-2-826e65c0f5a0ee9ce497a354fb9093d4161c553c.tar.bz2
gentoo-2-826e65c0f5a0ee9ce497a354fb9093d4161c553c.zip
remove module when shutting down #130220
(Portage version: 2.1_pre9)
Diffstat (limited to 'sys-apps/rlocate')
-rwxr-xr-xsys-apps/rlocate/files/rlocated.rc20
1 files changed, 13 insertions, 7 deletions
diff --git a/sys-apps/rlocate/files/rlocated.rc b/sys-apps/rlocate/files/rlocated.rc
index 4fccbc6ed53f..8a0ea2d1c510 100755
--- a/sys-apps/rlocate/files/rlocated.rc
+++ b/sys-apps/rlocate/files/rlocated.rc
@@ -1,24 +1,30 @@
#!/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 $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/rlocate/files/rlocated.rc,v 1.2 2006/04/18 22:37:21 vapier Exp $
-checkconfig() {
+start() {
if [[ ! -e /proc/rlocate ]] ; then
- modprobe rlocate || return 1
+ ebegin "Loading rlocate kernel module"
+ modprobe rlocate
+ eend $? || return 1
fi
- return 0
-}
-start() {
- checkconfig || return 1
ebegin "Starting rlocated"
rlocated
eend $?
}
stop() {
+ local ret
ebegin "Stopping rlocated"
start-stop-daemon --stop --quiet --pidfile /var/run/rlocated.pid
+ ret=$?
+ eend ${ret}
+
+ ebegin "Removing rlocate kernel module"
+ rmmod rlocate
eend $?
+
+ return ${ret}
}