[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]


I am packaging camsource - a webcam-streaming software. 

I've just added an init script that gets installed with dh_installinit.
However on this testing box where I check the packaging in chroot does
not have a webcam attached, so the daemon is missing a device and not
starting correctly:

Unable to open /dev/video0 (No such device)
Failed to open device for <camdev name="default">
invoke-rc.d: initscript camsource, action "start" failed.
dpkg: error processing camsource (--install):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:

I'm not sure what would be best practice to avoid those errors, because
the admin might have to configure the video device first anyway (though
the default /dev/video0 is usually a nice guess).

Have an /etc/default/camsource where the admin has to enable the daemon
The init script could display something like 
"Please configure camsource using /etc/camsource.conf and enable it in
/etc/default/camsource if you want to use init to start it." 
if not enabled...

Use --no-start with dh_installinit and stop the daemon manually on
uninstall in prerm?


-- Balu

Reply to: