NetBSD/etc/rc.d/cgd

36 lines
511 B
Plaintext
Raw Normal View History

#!/bin/sh
#
2010-11-01 17:41:11 +03:00
# $NetBSD: cgd,v 1.8 2010/11/01 14:41:11 christos Exp $
#
# PROVIDE: cgd
# REQUIRE: rndctl
# BEFORE: DISKS
# KEYWORD: interactive
$_rc_subr_loaded . /etc/rc.subr
name="cgd"
rcvar=$name
start_cmd="cgd_start"
stop_cmd=":"
cgd_start()
{
if [ -f /etc/cgd/cgd.conf ]; then
print_rc_normal "Configuring CGD devices."
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
}
load_rc_config $name
run_rc_command "$1"