LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't disable cups daemon on Ubuntu 10.04 (https://www.linuxquestions.org/questions/linux-newbie-8/cant-disable-cups-daemon-on-ubuntu-10-04-a-885505/)

ubusnake 06-09-2011 08:10 PM

Can't disable cups daemon on Ubuntu 10.04
 
Fresh install of Ubuntu 10.04 x86_64.

I've tried to disable cups service from sysvinit scripts, but why cups is still starting with the computer?

Code:

root@computer:/home/user# update-rc.d cups disable
update-rc.d: warning: cups start runlevel arguments (none) do not match LSB Default-Start values (2 3 4 5)
update-rc.d: warning: cups stop runlevel arguments (none) do not match LSB Default-Stop values (1)
 Disabling system startup links for /etc/init.d/cups ...
 Removing any system startup links for /etc/init.d/cups ...
  /etc/rc1.d/K80cups
  /etc/rc2.d/S50cups
  /etc/rc3.d/S50cups
  /etc/rc4.d/S50cups
  /etc/rc5.d/S50cups
 Adding system startup for /etc/init.d/cups ...
  /etc/rc1.d/K80cups -> ../init.d/cups
  /etc/rc2.d/K50cups -> ../init.d/cups
  /etc/rc3.d/K50cups -> ../init.d/cups
  /etc/rc4.d/K50cups -> ../init.d/cups
  /etc/rc5.d/K50cups -> ../init.d/cups


andrewthomas 06-09-2011 08:26 PM

Ubuntu uses upstart, not sysvinit.

You need to edit /etc/init/cups.conf


and comment out the start on lines

Code:

start on (filesystem
          and (started dbus or runlevel [2345])
          and stopped udevtrigger)


ubusnake 06-09-2011 09:21 PM

Quote:

Originally Posted by andrewthomas (Post 4381468)
You need to edit /etc/init/cups.conf

Ubuntu 10.04 doesn't have /etc/init/cups.conf -file

Code:

user@computer:~$ ls -A1 /etc/init/
acpid.conf
alsa-mixer-save.conf
anacron.conf
apport.conf
atd.conf
console-setup.conf
control-alt-delete.conf
cron.conf
dbus.conf
dmesg.conf
failsafe-x.conf
gdm.conf
hostname.conf
hwclock.conf
hwclock-save.conf
irqbalance.conf
module-init-tools.conf
mountall.conf
mountall-net.conf
mountall-reboot.conf
mountall-shell.conf
mounted-dev.conf
mounted-tmp.conf
mounted-varrun.conf
networking.conf
network-interface.conf
network-interface-security.conf
network-manager.conf
plymouth.conf
plymouth-log.conf
plymouth-splash.conf
plymouth-stop.conf
procps.conf
rc.conf
rcS.conf
rc-sysinit.conf
rsyslog.conf
screen-cleanup.conf
tty1.conf
tty2.conf
tty3.conf
tty4.conf
tty5.conf
tty6.conf
udev.conf
udev-finish.conf
udevmonitor.conf
udevtrigger.conf
ufw.conf
upstart-udev-bridge.conf
ureadahead.conf
ureadahead-other.conf

What's next?

andrewthomas 06-09-2011 10:00 PM

http://ubuntuforums.org/showthread.p...t=cups+disable

You really should refrain from simultaneously posting the same question on different forums.

You could put the following script in /etc/rc.local

and then
Code:

sudo chmod +x /etc/rc.local

Code:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

service cups stop

exit 0


ubusnake 06-10-2011 08:06 AM

Your solution doesn't work, after reboot cups is still alive.

Code:

$ ls -l /etc/rc.local
-rwxr-xr-x 1 root root 324 2011-06-10 15:57 /etc/rc.local
$
$ cat /etc/rc.local
#!/bin/sh -e
service cups stop
exit 0

after reboot:
Code:

$ ps -ae | grep -i cups
 1301 ?        00:00:00 cupsd

I'd like to know what config/program forces cups to autostart?
?

tredegar 06-10-2011 10:37 AM

Ubuntu 10.04 is in a bit of a muddle with upstart at the moment.

Try this:
Install bum
System - Admin - Boot-Up Manager.
Click the Services tab
Find cups and deactivate it.
Click Apply.


All times are GMT -5. The time now is 11:14 PM.