mkinitcpio "systemd" build hook does not handle "special characters" in Exec* options
Task Info (Flyspray) | |
---|---|
Opened By | Marcel Röthke (mroethke) |
Task ID | 61694 |
Type | Bug Report |
Project | Arch Linux |
Category | Packages: Core |
Version | None |
OS | All |
Opened | 2019-02-09 21:04:45 UTC |
Status | Assigned |
Assignee | Dave Reisner (falconindy) |
Assignee | Christian Hesse (eworm) |
Details
Description: Exec* option in systemd service files can have "special characters" (!, !!, @,- , +) directly after the "=", they alter systemds behavior and have nothing to do with the binary path. This is documented in the man page systemd.service under "ExecStart". The function add_systemd_unit from the systemd hook does not handle this and errors out, because it can't find the binary.
Additional info:
package version: systemd: 240.34-3 mkinitcpio: 25-1
I attached a minimal hook that shows this issue and a simple fix that works for me™.
Steps to reproduce:
- Write an mkinitcpio hook that uses add_systemd_unit with "special characters" in Exec* options e.g. systemd-networkd.service
- Add custom hook to to hooks array
- rebuild initramfs