Module Name: src Committed By: enami Date: Tue Apr 5 02:52:28 UTC 2011
Modified Files: src/etc/rc.d: ccd Log Message: Unconfigure on shutdown so that component deivces are closed. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/etc/rc.d/ccd 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/ccd diff -u src/etc/rc.d/ccd:1.6 src/etc/rc.d/ccd:1.7 --- src/etc/rc.d/ccd:1.6 Tue Apr 21 16:08:57 2009 +++ src/etc/rc.d/ccd Tue Apr 5 02:52:27 2011 @@ -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"