Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Apr 2011 13:39:54 +0200
From:      Matthias Apitz <guru@unixarea.de>
To:        Hans Petter Selasky <hselasky@c2i.net>, freebsd-multimedia@freebsd.org
Subject:   Re: webcamd-0.1.23 does not start via rc.d
Message-ID:  <20110414113952.GA8289@sh4-5.1blu.de>
In-Reply-To: <20110414104616.GA26390@sh4-5.1blu.de>
References:  <20110413140141.GA9608@sh4-5.1blu.de> <201104141047.58402.hselasky@c2i.net> <20110414092354.GA28455@sh4-5.1blu.de> <201104141140.29531.hselasky@c2i.net> <20110414104616.GA26390@sh4-5.1blu.de>

next in thread | previous in thread | raw e-mail | index | archive | help
El día Thursday, April 14, 2011 a las 12:46:17PM +0200, Matthias Apitz escribió:

> > Hi,
> > 
> > Your device should be detected by the rules in:
> > /usr/local/etc/devd/webcamd.conf
> 
> Now I understand what the problem is: the webcamd is NOT supposed to
> start at boot time (as the man page says: "... To start webcamd
> automatically at system startup, place the following line in
> rc.conf(5)...", please correct this), but should start as a devd(8)
> hook; I will debug devd(8) to see why it does not come up;
> 
> > 
> > Are you using 8-stable?
> 
> No. 9-CURRENT r214444: Thu Oct 28 10:56:32 CEST 2010

I've nailed it down:

On cam attach devd(8) launches:

...
Testing intclass=0xff against ^0xff
Executing 'env LD_PRELOAD=/usr/local/lib/libcuse4bsd.so /usr/local/etc/rc.d/webcamd start '

i.e. the 2nd arg (from $cdev) is empty; I changed the lines in /usr/local/etc/devd/webcamd.conf
to:

action "env LD_PRELOAD=/usr/local/lib/libcuse4bsd.so /usr/local/etc/rc.d/webcamd start $ugen";

and now it works fine and webcamd(8) gets started as:

$ ps ax | fgrep web
 1643  ??  Is     0:00,04 /usr/local/sbin/webcamd -B -d ugen0.3 -i 0

Another hint:

On the first succesfull test I got a PANIC because I have had loaded
pwc.ko and the cam was already attached on start of devd(8); this was
because the device /dev/video0 was already created by pwc.ko; this
should be changed to not cause PANIC when webcamd(8) can't create the
device; the permissions of /dev/video0 are created as 0600, this as well
should be changed by some lines in /usr/local/etc/devd/webcamd.conf to
0666, I think;

Thanks

	matthias

-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <guru@unixarea.de> - w http://www.unixarea.de/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110414113952.GA8289>