Unconfigure cgd devices on shutdown, so that underlying layers (i.e.,
RAIDframe) are happier.
This commit is contained in:
parent
902a7e92fe
commit
e32d4e2d39
13
etc/rc.d/cgd
13
etc/rc.d/cgd
@ -1,16 +1,17 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: cgd,v 1.3 2004/08/13 18:08:03 mycroft Exp $
|
||||
# $NetBSD: cgd,v 1.4 2005/03/02 12:14:47 tv Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: disks
|
||||
# KEYWORD: shutdown
|
||||
|
||||
$_rc_subr_loaded . /etc/rc.subr
|
||||
|
||||
name="cgd"
|
||||
rcvar=$name
|
||||
start_cmd="cgd_start"
|
||||
stop_cmd=":"
|
||||
stop_cmd="cgd_stop"
|
||||
|
||||
cgd_start()
|
||||
{
|
||||
@ -20,5 +21,13 @@ cgd_start()
|
||||
fi
|
||||
}
|
||||
|
||||
cgd_stop()
|
||||
{
|
||||
if [ -f /etc/cgd/cgd.conf ]; then
|
||||
echo "Unconfiguring CGD devices."
|
||||
cgdconfig -U
|
||||
fi
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
Loading…
Reference in New Issue
Block a user