| Summary: | cannot stop cups.service (with service, systemd, killall -9 etc...) | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Chris Denice <eatdirt> |
| Component: | RPM Packages | Assignee: | D Morgan <dmorganec> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | bittwister2, mageia |
| Version: | Cauldron | ||
| Target Milestone: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | cups-1.5.2-1.mga2.src.rpm | CVE: | |
| Status comment: | |||
| Bug Depends on: | |||
| Bug Blocks: | 2120 | ||
|
Description
Chris Denice
2012-03-01 16:08:17 CET
Hmm, works for me. But then again I use a period between cups.service
and I have smb.service disabled because it complained about cusps not running.
[root@wb2 ~]# systemctl enable cups.service
ln -s '/lib/systemd/system/cups.service' '/etc/systemd/system/printer.target.wants/cups.service'
ln -s '/lib/systemd/system/cups.socket' '/etc/systemd/system/sockets.target.wants/cups.socket'
ln -s '/lib/systemd/system/cups.path' '/etc/systemd/system/multi-user.target.wants/cups.path'
[root@wb2 ~]# systemctl start cups.service
[root@wb2 ~]# systemctl status cups.service
cups.service - CUPS Printing Service
Loaded: loaded (/lib/systemd/system/cups.service; enabled)
Active: active (running) since Thu, 01 Mar 2012 11:00:55 -0600; 4s ago
Main PID: 3639 (cupsd)
CGroup: name=systemd:/system/cups.service
â 3639 /usr/sbin/cupsd -f
[root@wb2 ~]# systemctl stop cups.service
[root@wb2 ~]# systemctl status cups.service
cups.service - CUPS Printing Service
Loaded: loaded (/lib/systemd/system/cups.service; enabled)
Active: inactive (dead) since Thu, 01 Mar 2012 11:01:06 -0600; 3s ago
Process: 3639 ExecStart=/usr/sbin/cupsd -f (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/cups.service
[root@wb2 ~]# systemctl disable cups.service
rm '/etc/systemd/system/printer.target.wants/cups.service'
rm '/etc/systemd/system/sockets.target.wants/cups.socket'
rm '/etc/systemd/system/multi-user.target.wants/cups.path'CC:
(none) =>
junk_no_spam
Manuel Hiebel
2012-03-01 23:59:00 CET
Blocks:
(none) =>
2120 Cups the service will stop fine, but if something wants to use cups it will be started again via socket activation. e.g. see the following sequence: [root@jimmy ~]# systemctl status cups.service cups.service - CUPS Printing Service Loaded: loaded (/lib/systemd/system/cups.service; enabled) Active: active (running) since Sat, 24 Mar 2012 21:32:34 +0000; 21s ago Main PID: 11522 (cupsd) CGroup: name=systemd:/system/cups.service â 11522 /usr/sbin/cupsd -f [root@jimmy ~]# ps aux | grep cups root 11522 0.0 0.1 100644 3848 ? Ss 21:32 0:00 /usr/sbin/cupsd -f So we start off with cups running. All is well in the world, but lets stop it. [root@jimmy ~]# systemctl stop cups.service [root@jimmy ~]# ps aux | grep cups [root@jimmy ~]# systemctl status cups.service cups.service - CUPS Printing Service Loaded: loaded (/lib/systemd/system/cups.service; enabled) Active: inactive (dead) since Sat, 24 Mar 2012 21:33:08 +0000; 7s ago Process: 11522 ExecStart=/usr/sbin/cupsd -f (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/cups.service OK, so cups is stopped. Again all is well in the world. But what happens when we try to make use of a command that needs to use cups: [root@jimmy ~]# lpq lpq: Error - no default destination available. OK, so what is the state of things now? [root@jimmy ~]# systemctl status cups.service cups.service - CUPS Printing Service Loaded: loaded (/lib/systemd/system/cups.service; enabled) Active: active (running) since Sat, 24 Mar 2012 21:33:22 +0000; 2s ago Main PID: 11566 (cupsd) CGroup: name=systemd:/system/cups.service â 11566 /usr/sbin/cupsd -f [root@jimmy ~]# ps aux | grep cups root 11566 0.1 0.1 100644 3844 ? Ss 21:33 0:00 /usr/sbin/cupsd -f OK, so just running lpq has automatically spawned cups! Yay for functionality!! So all this is expected behaviour. If you really don't want it, simply do: [root@jimmy ~]# systemctl stop cups.service cups.socket [root@jimmy ~]# ps aux | grep cups [root@jimmy ~]# lpq lpq: Unable to connect to server. [root@jimmy ~]# ps aux | grep cups So as you can see, cups is no longer spawned automatically. To reenable autospawning (without starting cups itself) simply do: [root@jimmy ~]# systemctl start cups.socket [root@jimmy ~]# lpq lpq: Error - no default destination available. [root@jimmy ~]# ps aux | grep cups root 11643 0.2 0.1 100644 3844 ? Ss 21:37 0:00 /usr/sbin/cupsd -f So as you can see, this is simply a feature, not a bug. Status:
NEW =>
RESOLVED |