Subject: bin/29845: /etc/rc.d/ccd does not support stop
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <martti.kuparinen@iki.fi>
List: netbsd-bugs
Date: 03/31/2005 08:14:00
>Number:         29845
>Category:       bin
>Synopsis:       /etc/rc.d/ccd does not support stop
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 31 08:14:00 +0000 2005
>Originator:     Martti Kuparinen
>Release:        NetBSD 3.99.2
>Organization:
>Environment:
System: NetBSD localhost 3.99.2 NetBSD 3.99.2 (XEN0) #0: Thu Mar 31 11:45:37 EEST 2005  root@localhost:/usr/src/sys/arch/i386/compile/XEN0 i386
Architecture: i386
Machine: i386
>Description:

ccd devices can not be stopped (or restarted) by running
"/etc/rc.d/ccd stop". It seems like /etc/rc.d/ccd is missing
the ccd_stop() function.

But things aren't that simple: how to first umount the filesystems
using ccd and the remount them properly? And how about services
using those filesystems?

Maybe the ccd_stop() should simply print a warning to the user
that she needs to shutdown the affected services and then execute
"ccdconfig -U"?

>How-To-Repeat:

# /etc/rc.d/ccd restart
Configuring CCD devices.
ccdconfig: ioctl (CCDIOCSET): /dev/ccd0d: Device busy

# ccdconfig -U
# /etc/rc.d/ccd restart
Configuring CCD devices.

>Fix: