Hide Forgot
Description of problem: The ccpd daemon does not start correctly and printing fails on a Canon LBP2900. /etc/init.d/ccpd status shows one process running. When it is running normally, it should show 2 processes running. No errors are reported. We need to stop the ccdp server and restart it. Version-Release number of selected component (if applicable): systemd-26-2.fc15.x86_64 CAPT Printer Driver for Linux Version 2.30 How reproducible: Every boot. Steps to Reproduce: 1.Install driver from http://support-asia.canon-asia.com/contents/ASIA/EN/0900772407.html 2.add /etc/init.d/ccdp start to /etc/rc.local 3. Actual results: bash-4.2$ sudo systemctl status ccpd.service ccpd.service - LSB: Start Canon Printer Daemon for CUPS Loaded: loaded (/etc/rc.d/init.d/ccpd) Active: active (running) since Fri, 03 Jun 2011 09:49:25 +0530; 1min 47s ago Process: 2603 ExecStart=/etc/rc.d/init.d/ccpd start (code=exited, status=0/SUCCESS) Main PID: 2634 (ccpd) CGroup: name=systemd:/system/ccpd.service └ 2634 /usr/sbin/ccpd Expected results: bash-4.2$ sudo systemctl status ccpd.service ccpd.service - LSB: Start Canon Printer Daemon for CUPS Loaded: loaded (/etc/rc.d/init.d/ccpd) Active: active (running) since Fri, 03 Jun 2011 09:56:52 +0530; 11min ago Process: 5681 ExecStop=/etc/rc.d/init.d/ccpd stop (code=exited, status=0/SUCCESS) Process: 5693 ExecStart=/etc/rc.d/init.d/ccpd start (code=exited, status=0/SUCCESS) Main PID: 5698 (ccpd) CGroup: name=systemd:/system/ccpd.service ├ 5698 /usr/sbin/ccpd ├ 5702 /usr/sbin/ccpd └ 5703 captmon2 --data-write-fd=8 --data-read-fd=12 --cmd... Additional info:
(In reply to comment #0) > 2.add /etc/init.d/ccdp start to /etc/rc.local Ugh. Can you instead enable ccdp using chkconfig like you would for any other initscript?
"systemctl enable ccpd.service" reported that the file was incompatible with chkconfig. But I found a link with the lines to add to make it compatible with chkconfig. The file was for OpenSuse and had the line # Should-Start: $ALL It created links S-1ccpd. So, I just deleted the $all option. It then created the link S50ccpd. The lines added were: ### BEGIN INIT INFO # Provides: ccpd # Required-Start: $local_fs $remote_fs $syslog $network $named # Should-Start: # Required-Stop: $syslog $remote_fs # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Description: Start Canon Printer Daemon for CUPS ### END INIT INFO` Still, the problem was the same. I then used rc.local as that is the last thing done. I was also confused by cups insisting on adding an additional printer LBP2900-2 for device usb://Canon/LBP2900. But that seems to be harmless. Incidentally, the Canon's printer support of Linux is definitely very-very flaky. It does not seem to handle or report any errors properly. Should not have bought it.
I see. The main problem with that initscript is that it's missing a chkconfig line, for instance: # chkconfig: - 90 10 If you add it, "chkconfig --add ccpd" will work and "chkconfig ccpd on" will too. The problem with starting units from other units (rc-local.service is a kind of a unit too) is that it may lead to deadlocks such as the one described in: https://bugzilla.redhat.com/show_bug.cgi?id=690177#c10 (The "--ignore-dependencies" trick should work in your case too. But I really recommend to make ccpd work as a proper initscript instead.)