2002-10-09 18:55:53 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2010-11-01 17:41:11 +03:00
|
|
|
# $NetBSD: cgd,v 1.8 2010/11/01 14:41:11 christos Exp $
|
2002-10-09 18:55:53 +04:00
|
|
|
#
|
|
|
|
|
2009-04-21 20:08:57 +04:00
|
|
|
# PROVIDE: cgd
|
|
|
|
# REQUIRE: rndctl
|
|
|
|
# BEFORE: DISKS
|
2009-09-11 22:18:03 +04:00
|
|
|
# KEYWORD: interactive
|
2002-10-09 18:55:53 +04:00
|
|
|
|
2004-08-13 22:08:03 +04:00
|
|
|
$_rc_subr_loaded . /etc/rc.subr
|
2002-10-09 18:55:53 +04:00
|
|
|
|
|
|
|
name="cgd"
|
2003-03-19 09:06:47 +03:00
|
|
|
rcvar=$name
|
2002-10-09 18:55:53 +04:00
|
|
|
start_cmd="cgd_start"
|
2005-03-02 22:09:22 +03:00
|
|
|
stop_cmd=":"
|
2002-10-09 18:55:53 +04:00
|
|
|
|
|
|
|
cgd_start()
|
|
|
|
{
|
|
|
|
if [ -f /etc/cgd/cgd.conf ]; then
|
2009-09-11 22:18:03 +04:00
|
|
|
print_rc_normal "Configuring CGD devices."
|
2002-10-09 18:55:53 +04:00
|
|
|
cgdconfig -C
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2010-11-01 17:41:11 +03:00
|
|
|
cgd_stop()
|
|
|
|
{
|
|
|
|
if [ -f /etc/cgd/cgd.conf ]; then
|
|
|
|
print_rc_normal "Unconfiguring CGD devices."
|
|
|
|
cgdconfig -U
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2002-10-09 18:55:53 +04:00
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|