Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 585658

Summary: sys-apps/kexec-tools: systemd unit does not allow more than one commandline argument
Product: Gentoo Linux Reporter: Tiziano Müller <dev-zero>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: CONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Tiziano Müller gentoo-dev 2016-06-12 07:53:16 UTC
With curly braces, environment variables will be be passed as one string (one argument) to the command, making it impossible to pass more than one optional argument to kexec, see also http://0pointer.de/public/systemd-man/systemd.service.html#Command%20lines

diff --git a/sys-apps/kexec-tools/files/kexec.service b/sys-apps/kexec-tools/files/kexec.service
index 289aae0..c387310 100644
--- a/sys-apps/kexec-tools/files/kexec.service
+++ b/sys-apps/kexec-tools/files/kexec.service
@@ -9,8 +9,8 @@ ConditionPathExists=!/nokexec
 Type=oneshot
 RemainAfterExit=yes
 EnvironmentFile=/etc/kexec.conf
-ExecStart=/usr/sbin/kexec -l /boot/${KNAME} ${KEXEC_OPT_ARGS}
-ExecStop=/usr/sbin/kexec -l /boot/${KNAME} ${KEXEC_OPT_ARGS}
+ExecStart=/usr/sbin/kexec -l /boot/${KNAME} $KEXEC_OPT_ARGS
+ExecStop=/usr/sbin/kexec -l /boot/${KNAME} $KEXEC_OPT_ARGS
 
 [Install]
 WantedBy=multi-user.target
Comment 1 SpanKY gentoo-dev 2016-06-12 17:58:46 UTC
if you use systemd, feel free to commit changes to service files