What keeps overwriting my CUPS config

General support questions including new installations
majun
Posts: 141
Joined: 2010/03/11 11:33:59

What keeps overwriting my CUPS config

Post by majun » 2011/03/28 06:18:55

Occasionaly, something keeps overwriting my CUPS config, making my printers unaccessible on the local network. Any idea what this could be?
Also, what's the idea behind cups-config-daemon and could that be the culprit?

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: What keeps overwriting my CUPS config

Post by pschaff » 2011/03/28 09:59:56

The [url=http://www.google.com/search?q=cups-config-daemon&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a]cups-config-daemon[/url] is the likely culprit.

majun
Posts: 141
Joined: 2010/03/11 11:33:59

Re: What keeps overwriting my CUPS config

Post by majun » 2011/03/28 14:41:18

That's what I thought. I've only discovered and disabled it yesterday. What exactly does it do anyway? I've googled it but can't seem to find any reliable information on it. :-?

User avatar
AlanBartlett
Forum Moderator
Posts: 9323
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: What keeps overwriting my CUPS config

Post by AlanBartlett » 2011/03/28 14:46:41

[quote]
What exactly does it do anyway?
[/quote]
Answer -- nothing. :-)

Let's take a look --

[code]
[ajb@GX1 ~]$ cat /etc/rc.d/init.d/cups-config-daemon
#!/bin/sh
#
# cups-config-daemon: Cups configuration daemon (obsolete)
#
# chkconfig: - 98 02
# description: cups-config-daemon is obsolete\
# This script just avoids that the postun script\
# of hal-cups-utils < 0.6.0 fails

echo cups-config-daemon is obsolete
exit 0
[/code]

majun
Posts: 141
Joined: 2010/03/11 11:33:59

Re: What keeps overwriting my CUPS config

Post by majun » 2011/03/28 14:52:44

Thank you Alan. In that case I find it hard to believe it's actually the process overwriting my cupsd.conf file if it doesn't really do anything.

User avatar
AlanBartlett
Forum Moderator
Posts: 9323
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: What keeps overwriting my CUPS config

Post by AlanBartlett » 2011/03/28 15:02:51

Perhaps it does do something . . . :oops:

I have quoted from a [i]CentOS 5[/i] system, not [i]CentOS 4[/i]. [img]http://www.centos.toracat.org/ajb/tmp/doh.gif[/img] "[b]D'oh![/b]"

Would you like to post the contents of your system's [b]/etc/rc.d/init.d/cups-config-daemon[/b] file, please?

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: What keeps overwriting my CUPS config

Post by pschaff » 2011/03/28 15:07:22

Edit: I see [b]Alan[/b] has already engaged in the classic head-slap. :-)

[quote]
AlanBartlett wrote:
[quote]
What exactly does it do anyway?
[/quote]
Answer -- nothing. :-)

Let's take a look --
...[/quote]

Not quite what I see on 4.9:[code]
$ cat /etc/init.d/cups-config-daemon
#!/bin/sh
#
# cups-config-daemon: Cups configuration daemon
#
# chkconfig: 345 98 02
# description: This is a daemon for configuring printers through D-BUS
#
# processname: cups-config-daemon
# pidfile: /var/run/cups-config-daemon.pid
#

# Sanity checks.
[ -x /usr/bin/cups-config-daemon ] || exit 0

# Source function library.
. /etc/rc.d/init.d/functions

# so we can rearrange this easily
processname=cups-config-daemon
servicename=cups-config-daemon

RETVAL=0

start() {
echo -n $"Starting cups-config-daemon: "
daemon --check $servicename $processname
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename && echo `/sbin/pidof $processname` > /var/run/cups-config-daemon.pid
}

stop() {
echo -n $"Stopping cups-config-daemon: "

killproc $servicename -TERM
RETVAL=$?
echo
if [ $RETVAL -eq 0 ]; then
rm -f /var/lock/subsys/$servicename
rm -f /var/run/cups-config-daemon.pid
fi
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $processname
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f /var/lock/subsys/$servicename ]; then
stop
start
fi
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
;;
esac
exit $RETVAL[/code]

majun
Posts: 141
Joined: 2010/03/11 11:33:59

Re: What keeps overwriting my CUPS config

Post by majun » 2011/03/29 20:51:59

Whatever it is it can't be cups-config-daemon because as I've said I've stopped it yesterday and it just happend again. Tne new cupsd.conf belongs to lp:sys if that helps. 'It' also created a cupsd.conf.save file which is a backup of the old, not yet overwritten cupsd.conf file.

According to the time stamp it could have been around the time I've switched on my HP Officejet 6110 to scan something - is it possible that a USB printer messes with cupsd.conf all by itself or is that merely a coincidence?

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: What keeps overwriting my CUPS config

Post by pschaff » 2011/03/29 20:55:19

The cups GUI tools or web interface may also overwrite config files. Could anyone be messing with those?

majun
Posts: 141
Joined: 2010/03/11 11:33:59

Re: What keeps overwriting my CUPS config

Post by majun » 2011/03/30 07:58:45

No. In this case the legendary "I swear I didn't do anything" is actually true. Unless my wife suddenly took a liking to Linux administration, which is highly improbable (then again, so was Japan...). She's the only other person around and doesn't mess with it. She doesn't even know what CUPS or a webinterface is.

I think I know what the external cause for this is: it seems to be my HP Officejet 6110 printer. I've just switched it off and on again, and my cupsd.conf is once again modified:

[quote][root@gaylord cups]# diff cupsd.conf cupsd.conf.master
852a853
> # Lines below are automatically generated - DO NOT EDIT
859d859
BrowseAllow from 192.168.0.0/24
864a865
> Listen 192.168.0.13:631[/quote]

I don't think I'll be messing with this for now since that printer will have to go anyway. I've already bought the new one but didn't have time to set it up yet. It's also a USB printer though so it might behave similarly :-(

Post Reply

Return to “CentOS 4 - General Support”