-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot run systemctl disable --now on a template unit #15620
Comments
Just to let everyone know, this issue is still around in version 250 systemctl disable --user --now 'barrier@*'
Glob pattern passed to enable, but globs are not supported for this.
Invalid unit name "barrier@*" escaped as "barrier@\x2a". |
that's annoying...
edit 1:
edit 2:
|
It's the mass- $ sudo systemctl enable --now akmods@6.2.15-300.fc38.x86_64.service
Created symlink /etc/systemd/system/multi-user.target.wants/akmods@6.2.15-300.fc38.x86_64.service → /usr/lib/systemd/system/akmods@.service.
$ sudo systemctl list-units akmods@\*.service
UNIT LOAD ACTIVE SUB DESCRIPTION >
akmods@6.2.15-300.fc38.x86_64.service loaded active exited Builds and install>
$ sudo systemctl disable akmods@.service
Removed "/etc/systemd/system/multi-user.target.wants/akmods@6.2.15-300.fc38.x86_64.service".
$ sudo systemctl list-units akmods@\*.service
UNIT LOAD ACTIVE SUB DESCRIPTION >
akmods@6.2.15-300.fc38.x86_64.service loaded active exited Builds and install>
$ sudo systemctl stop akmods@6.2.15-300.fc38.x86_64.service
$ sudo systemctl list-units akmods@\*.service
UNIT LOAD ACTIVE SUB DESCRIPTION
0 loaded units listed. Pass --all to see loaded but inactive units, too.
$ sudo systemctl enable --now akmods@6.2.15-300.fc38.x86_64.service
Created symlink /etc/systemd/system/multi-user.target.wants/akmods@6.2.15-300.fc38.x86_64.service → /usr/lib/systemd/system/akmods@.service.
$ sudo systemctl disable --now akmods@.service
Removed "/etc/systemd/system/multi-user.target.wants/akmods@6.2.15-300.fc38.x86_64.service".
Failed to stop akmods@.service: Unit name akmods@.service is missing the instance name.
See system logs and 'systemctl status akmods@.service' for details.
$ sudo systemctl list-units akmods@\*.service
UNIT LOAD ACTIVE SUB DESCRIPTION >
akmods@6.2.15-300.fc38.x86_64.service loaded active exited Builds and install> |
This is also unfortunate, because |
While unistalling a RPM using the `preun` macro templated units produce a warning `Failed to stop $@: Unit name $@ is missing the instance name.` This issue seems to be caputred by systemd#15620. To prevent this warning when using RPM macros, adjust macro to function without `--now` argument.
While unistalling a RPM using the `preun` macro templated units produce a warning `Failed to stop $@: Unit name $@ is missing the instance name.` This issue seems to be caputred by systemd#15620. To prevent this warning when using RPM macros, adjust macro to function without `--now` argument.
While uninstalling a RPM using the `preun` macro templated units produce a warning `Failed to stop $@: Unit name $@ is missing the instance name.` This issue seems to be captured by systemd#15620. To prevent this warning when using RPM macros adjust macro to function without `--now` argument.
While uninstalling a RPM using the `preun` macro templated units produce a warning `Failed to stop $@: Unit name $@ is missing the instance name.` This issue seems to be captured by systemd#15620. To prevent this warning when using RPM macros adjust macro to function without `--now` argument.
While uninstalling a RPM using the `preun` macro templated units produce a warning `Failed to stop $@: Unit name $@ is missing the instance name.` This issue seems to be captured by systemd#15620. To prevent this warning when using RPM macros adjust macro to function without `--now` argument.
Isn't there a better way of masking / disabling services with wildcard in 2024?
|
@GrabbenD You're commenting on a closed issue about something that was already fixed. If you think there are issues with how |
systemd version the issue has been seen with
Used distribution
Expected behaviour you didn't see
Unexpected behaviour you saw
Steps to reproduce the problem
I originally discovered this issue when trying to get the
systemd_preun
RPM macro to get working with a template unit. Thesystemd_preun
macro usessystemctl disable --now
which makes it unusable for a template unit.The workaround I found is to use
systemctl disable
andsystemctl stop
separately like this:This issue was originally reported in #9862 but imho it got accidentally closed.
The text was updated successfully, but these errors were encountered: