Source-Changes-HG archive

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

[src/trunk]: src/etc/rc.d Unconfigure on shutdown so that component deivces a...



details:   https://anonhg.NetBSD.org/src/rev/278064c3b184
branches:  trunk
changeset: 763835:278064c3b184
user:      enami <enami%NetBSD.org@localhost>
date:      Tue Apr 05 02:52:27 2011 +0000

description:
Unconfigure on shutdown so that component deivces are closed.

diffstat:

 etc/rc.d/ccd |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (38 lines):

diff -r 79af3b4975ce -r 278064c3b184 etc/rc.d/ccd
--- a/etc/rc.d/ccd      Tue Apr 05 00:27:35 2011 +0000
+++ b/etc/rc.d/ccd      Tue Apr 05 02:52:27 2011 +0000
@@ -1,17 +1,18 @@
 #!/bin/sh
 #
-# $NetBSD: ccd,v 1.6 2009/04/21 16:08:57 joerg Exp $
+# $NetBSD: ccd,v 1.7 2011/04/05 02:52:27 enami Exp $
 #
 
 # PROVIDE: ccd
 # BEFORE:  DISKS
+# KEYWORD: shutdown
 
 $_rc_subr_loaded . /etc/rc.subr
 
 name="ccd"
 rcvar=$name
 start_cmd="ccd_start"
-stop_cmd=":"
+stop_cmd="ccd_stop"
 
 ccd_start()
 {
@@ -21,5 +22,13 @@
        fi
 }
 
+ccd_stop()
+{
+       if [ -f /etc/ccd.conf ]; then
+               echo "Unconfiguring CCD devices."
+               ccdconfig -U
+       fi
+}
+
 load_rc_config $name
 run_rc_command "$1"



Home | Main Index | Thread Index | Old Index