On Wed, Feb 12, 2014 at 01:37:51AM +0100, Stefan Wollny wrote: > Am Wed, 12 Feb 2014 00:13:02 +0100 > schrieb Antoine Jacoutot <[email protected]>: > > > > Obviously cupsd is running as 'root' as it has been started by > > > rc.local. If I remember right it used to be user '_cups' who exists: > > > > Run the rc.d script in debug mode (i.e. -d) and you should be able to > > see the output. > > > > Hi Antoine (and 'Good Morning')! > > I commented the lines in /etc/rc.local, deleted the entry of 'cupsd' > in /etc/rc.conf.local and restarted. Et voilá: > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > $ sudo /etc/rc.d/cupsd -d start > doing rc_read_runfile > doing rc_check > cupsd > doing rc_pre > "/etc/cups/cups-files.conf" is OK. > "/etc/cups/cupsd.conf" is OK. > rm: /var/cache/cups/rss: is a directory > mv: rename /usr/bin/lpq to /usr/bin/lpq.pre-cups: Read-only file system > mv: rename /usr/bin/lpr to /usr/bin/lpr.pre-cups: Read-only file system > mv: rename /usr/bin/lprm to /usr/bin/lprm.pre-cups: Read-only file > system mv: rename /usr/sbin/lpc to /usr/sbin/lpc.pre-cups: Read-only > file system mv: rename /usr/sbin/lpd to /usr/sbin/lpd.pre-cups: > Read-only file system mv: rename /usr/share/man/man1/lpq.1 > to /usr/share/man/man1/lpq.1.pre-cups: Read-only file system mv: > rename /usr/share/man/man1/lpr.1 to /usr/share/man/man1/lpr.1.pre-cups: > Read-only file system mv: rename /usr/share/man/man1/lprm.1 > to /usr/share/man/man1/lprm.1.pre-cups: Read-only file system mv: > rename /usr/share/man/man8/lpc.8 to /usr/share/man/man8/lpc.8.pre-cups: > Read-only file system mv: rename /usr/share/man/man8/lpd.8 > to /usr/share/man/man8/lpd.8.pre-cups: Read-only file system > rm: /usr/bin/lpq: Read-only file system ln: /usr/bin/lpq: File exists > rm: /usr/bin/lpr: Read-only file system ln: /usr/bin/lpr: File exists > rm: /usr/bin/lprm: Read-only file system ln: /usr/bin/lprm: File exists > rm: /usr/sbin/lpc: Read-only file system > ln: /usr/sbin/lpc: File exists > doing rc_post > doing rc_rm_runfile > (failed) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > OK: There seems to be an issue with /usr mounted -ro. I changed the > setting in /etc/fstab to -rw and rebooted. Result: > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > $ sudo /etc/rc.d/cupsd -d start > doing rc_read_runfile > doing rc_check > cupsd > doing rc_pre > "/etc/cups/cups-files.conf" is OK. > "/etc/cups/cupsd.conf" is OK. > rm: /var/cache/cups/rss: is a directory > doing rc_start > doing rc_write_runfile > (ok) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Now I wanted to know if this was a one-time issue in the course of > upgrading to the latest version of cups and switched back to > mounting /usr '-ro'. After a restart I got: > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > $ sudo /etc/rc.d/cupsd -d start > doing rc_read_runfile > doing rc_check > cupsd > doing rc_pre > "/etc/cups/cups-files.conf" is OK. > "/etc/cups/cupsd.conf" is OK. > rm: /var/cache/cups/rss: is a directory > doing rc_start > doing rc_write_runfile > (ok) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > So obviously my assumption that running the system with /usr mounted > '-ro' should not affect /etc/rc.d-system was wrong for the case of > upgrading an affected program like cupsd. PEBCAK. > > As a final test I reactivated the start of cupsd in /etc/rc.conf.local > with /etc/fstab unchanged (mounting /usr -ro). After a restart 'top' > shows: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > $ top | grep cups > 24346 root 2 0 1696K 4344K idle kqread 0:00 0.00% cupsd > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Here we go: cupsd is up and running. Printing is as expected. > > Lesson learned: After upgrading it might be wise to once reboot off-line > with /usr mounted '-rw' and switch back to mounting '-ro' afterwards > being on-line. > > Antoine: Thank you so much for your kind hint. For the records I > documented a little more in detail what I did with this information > hoping it will help others in similar situations. > > (The only question left is why cupsd started from /etc/rc.local when > failing to start from /etc/rc.d???)
The answer to that is what you posted at the very beginning of your mail. -- Antoine

