Bugzilla – Bug 1038328
Printing/cups: Upgrading CUPS: 'Unit name cups-lpd@.service is missing the instance name'
Last modified: 2019-11-27 12:01:43 UTC
When Upgrading TW to 20170505 I got this output: ( 81/147) Installing: cups-2.1.3-5.1.x86_64 ............................................................................................................[done] Additional rpm output: Failed to try-restart cups-lpd@.service: Unit name cups-lpd@.service is missing the instance name. See system logs and 'systemctl status cups-lpd@.service' for details. > systemctl list-units | grep cups cups.path cups.service cups.socket > systemctl list-unit-files | grep cups cups.path enabled cups-browsed.service disabled cups-lpd@.service static cups.service enabled cups-lpd.socket disabled cups.socket enabled
Service units like cups-lpd@.service can become restart nor started nor enabled, as those are *templates* only. From manual page systemd.unit(5) Optionally, units may be instantiated from a template file at runtime. This allows creation of multiple units from a single configuration file. If systemd looks for a unit configuration file, it will first search for the literal unit name in the file system. If that yields no success and the unit name contains an "@" character, systemd will look for a unit template that shares the same name but with the instance string (i.e. the part between the "@" character and the suffix) removed. Example: if a service getty@tty3.service is requested and no file by that name is found, systemd will look for getty@.service and instantiate a service from that configuration file if it is found. To refer to the instance string from within the configuration file you may use the special "%i" specifier in many of the configuration options. See below for details.
IMHO the template cups-lpd@.service should not be in the line of the %service_*.* macros ... or we skip templates at all within the %service_*.* macros if there is no DefaultInstance given.
This seems to be fixed for boo#1050845 Fri Sep 14 05:30:55 UTC 2018 - antoine.belvire@opensuse.org - Fix warning message upon update (boo#1050845): Remove template service cups-lpd@ from service_* macro in scriptlets. ... hopefully no one will tries to enable template, as for e.g. for socket activation the socket units have to be enabled! *** This bug has been marked as a duplicate of bug 1050845 ***