Module Name:    src
Committed By:   isaki
Date:           Tue Jun 12 02:25:30 UTC 2012

Modified Files:
        src/etc/rc.d: makemandb

Log Message:
Allows you to disable it if makemandb=NO in rc.conf.
Thanks tsutsui@ and Yasushi Oshima.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/etc/rc.d/makemandb

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/rc.d/makemandb
diff -u src/etc/rc.d/makemandb:1.1 src/etc/rc.d/makemandb:1.2
--- src/etc/rc.d/makemandb:1.1	Tue Feb  7 19:13:30 2012
+++ src/etc/rc.d/makemandb	Tue Jun 12 02:25:29 2012
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: makemandb,v 1.1 2012/02/07 19:13:30 joerg Exp $
+# $NetBSD: makemandb,v 1.2 2012/06/12 02:25:29 isaki Exp $
 #
 
 # PROVIDE: makemandb
@@ -10,14 +10,17 @@
 $_rc_subr_loaded . /etc/rc.subr
 
 name="makemandb"
+rcvar=$name
 required_files="/etc/man.conf /usr/sbin/makemandb"
 start_cmd="makemandb_start"
 stop_cmd=":"
 
 makemandb_start()
 {
-	# Initiate update build in the background
-	nice -n 5 /usr/sbin/makemandb -q > /dev/null 2>&1 &
+	if checkyesno $rcvar; then
+		# Initiate update build in the background
+		nice -n 5 /usr/sbin/makemandb -q > /dev/null 2>&1 &
+	fi
 }
 
 load_rc_config $name

Reply via email to