Support executable prefixes on service files (@, -, :, +, !, !!)
See original GitHub issueOn service
files, the ExecStart=
option supports extra prefixes (@
, -
, :
, +
, !
, !!
) on the executable path.[1]
Currently (v1.4.4147) docker-systemctl-replacement
shows an error if prefixes such as !!
are used on a ExecStart=
option. For example on Debian/Ubuntu when using apt-get
to install some package dependencies, it triggers post update hooks, like calling systemd-resolved.service
which produces this error:
ERROR:systemctl: systemd-resolved.service: Executable path is not absolute, ignoring: !!/lib/systemd/systemd-resolved
As a temporary workaround until prefixes are supported, an option in most cases is to remove the required symbols:
find /etc /usr/lib /lib -name '*.service' | xargs grep -l 'ExecStart=!!/' | xargs sed -i 's/!!//'
[1] https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart= (version 245)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Systemd - using the "+" prefix with ExecStartPre
I want to run /usr/bin/tomcat1 with elevated privileges, but doing so with the "+" sign gives the following error (note, "-" does not...
Read more >systemd.service - Freedesktop.org
A unit configuration file whose name ends in " .service " encodes information ... Note that these prefixes are also supported for the...
Read more >File and Folder Prefix Variables - TechDocs - Broadcom Inc.
COMMON_DOCUMENTS. The file system folder that contains documents that are common to all users: C:\Documents and Settings\All Users\Documents. ( ...
Read more >Naming Files, Paths, and Namespaces - Win32 apps
All file systems supported by Windows use the concept of files and ... vary depending on the file system and path name prefix...
Read more >Prefix: The Developer's Code Profiling and Tracing Sidekick
Stop sorting through messy log files. Prefix brings all of your logs together in a consolidated log viewer to quickly locate issues, explore...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Seems like MySQL 8.0.29 is now using:
This fails on master branch, but develop branch appears to work well.
Just because tools like
systemd-resolved
andsystemd-timesyncd
“shouldn’t” run in a container doesn’t mean there aren’t use cases. For instance, I use Docker to unit test Ansible roles that later run on full-fat systems. I can’tsystemctl restart systemd-timesyncd
with this script, which means it’s unusable in my NTP configuration test.