From 826e65c0f5a0ee9ce497a354fb9093d4161c553c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 18 Apr 2006 22:37:21 +0000 Subject: remove module when shutting down #130220 (Portage version: 2.1_pre9) --- sys-apps/rlocate/files/rlocated.rc | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'sys-apps/rlocate') 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} } -- cgit v1.2.3-65-gdbad