Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/rc.d Use functions from rc.subr.



details:   https://anonhg.NetBSD.org/src/rev/6e3020dd2a46
branches:  trunk
changeset: 747209:6e3020dd2a46
user:      apb <apb%NetBSD.org@localhost>
date:      Sat Sep 05 16:24:03 2009 +0000

description:
Use functions from rc.subr.

diffstat:

 etc/rc.d/bootconf.sh |  17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diffs (42 lines):

diff -r 96487ec26023 -r 6e3020dd2a46 etc/rc.d/bootconf.sh
--- a/etc/rc.d/bootconf.sh      Sat Sep 05 16:13:21 2009 +0000
+++ b/etc/rc.d/bootconf.sh      Sat Sep 05 16:24:03 2009 +0000
@@ -1,11 +1,17 @@
 #!/bin/sh
 #
-# $NetBSD: bootconf.sh,v 1.9 2006/04/23 23:26:26 hubertf Exp $
+# $NetBSD: bootconf.sh,v 1.10 2009/09/05 16:24:03 apb Exp $
 #
 
 # PROVIDE: bootconf
 # REQUIRE: mountcritlocal
 
+$_rc_subr_loaded . /etc/rc.subr
+
+name="bootconf"
+start_cmd="bootconf_start"
+stop_cmd=":"
+
 bootconf_start()
 {
                # Refer to newbtconf(8) for more information
@@ -60,6 +66,8 @@
                fi
        done
 
+       rc_print_metadata "note:Using configuration \"$conf\""
+
        case  $conf in
        current|default)
                ;;
@@ -74,8 +82,5 @@
        fi
 }
 
-case "$1" in
-*start)
-       bootconf_start
-       ;;
-esac
+load_rc_config $name
+run_rc_command "$1"



Home | Main Index | Thread Index | Old Index