The current rc script is just unusable. It requires your to pass the device name by hand. Fix: I added a $webcamd_device variable, and changes pidfile accordingly. Note that the pid in the $pidfile is wrong, and I fixed it by hacking into the file content. I'm not pro at writing rc script. Please help me improve it, thx.
Responsible Changed From-To: freebsd-ports-bugs->hselasky Over to maintainer (via the GNATS Auto Assign Tool)
An updated version which deletes the fixed pidfile. -- Zhihao Yuan, nickname lichray The best way to predict the future is to invent it. ___________________________________________________ 4BSD -- http://4bsd.biz/
State Changed From-To: open->closed Committed. Thanks!
This fix isn't in the current source tree which means webcamd fails silently if the device isn't provided, and in fact all of the service commands are silent. Also, is it possible to have this automatically detect the device when daemonising, the same as it does when run in the foreground?
(In reply to Duane from comment #4) > Also, is it possible to have this automatically detect the device when > daemonising, the same as it does when run in the foreground? Never mind this, I've just seen that it uses devd to achieve this.
Hi, Can you add to the script support for multiple devices, that the webcamd rc.d script will iterate a webcamd_device_0,1, 2,3 list, or maybe space separated: webcamd_device="ugenX.X ugenY.Y" ... --HPS
This patch isn't mine, I just found in in the bugtracker while I was trying to figure out why I couldn't interact with webcamd through the service command, and I noted that this bug is marked as closed -> Committed, even though it doesn't appear in the source. I was really just intending to draw attention to the fact that `service webcamd status|stop|start|restart` does nothing, not even report an error. This patch would resolve that and the bugtracker claims that it was committed while the source shows it is not. Upon further reflection, if this patch had been included I probably would not have learnt of the relation between this service and the devd facility and would have manually entered the device in rc.conf which would likely have blown up if the device was ever moved to a different hub on the computer. I'll see if I can figure out how to make the service command trigger sensible behaviour from the rc script in light of its relation to devd, and if I come up with something I'll submit it as a separate request. Regards, Duane.
OK. I am re-writing this rc.d script to include the following variable: webcamd_devices="ugenX.X ugenY.Y" … And loop through the list, starting a new instance of webcamd for each device. For stop / status / restart, I shall be using prep & pill to match all running processes (rather than pidfile). This seems less hassle. The only thing I'm not sure what to do is with the "interface number" argument. Because I have not seen any reason to use it myself yet. Is it really necessary to specify explicitly? My devices seem to work fine without using it. Also: Launching multiple separate instances of webcamd (one instance for each device). This is not difficult. However what may be difficult is to set different kinds of "webcamd_flags" for each of the individual instances. I may not be able provide such an elegant solution for achieving that kind of finer control.
OK. I have finished brand new rc.d script and submitted it as PR 191781 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191781 Many thanks.