From a8684509ca3e1e5fd8a4490781405cdeac771bee Mon Sep 17 00:00:00 2001 From: christos Date: Mon, 1 Nov 2010 14:41:11 +0000 Subject: [PATCH] add a cgd_stop function --- etc/rc.d/cgd | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/etc/rc.d/cgd b/etc/rc.d/cgd index ad4f8c284031..a8d3fc85a378 100755 --- a/etc/rc.d/cgd +++ b/etc/rc.d/cgd @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: cgd,v 1.7 2009/09/11 18:18:03 apb Exp $ +# $NetBSD: cgd,v 1.8 2010/11/01 14:41:11 christos Exp $ # # PROVIDE: cgd @@ -23,5 +23,13 @@ cgd_start() fi } +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"