[opensuse-factory] Systemd Service % specifiers in ExecStart
Hi, does anyone know how systemd.service(5): ExecStart= [...] Unless Type=forking is set, the process started via this command line will be considered the main process of the daemon. The command line accepts % specifiers as described in systemd.unit(5). On top of that basic environment variable substitution is supported, where ${FOO} is replaced by the string value of the environment variable of the same name. Also $FOO may appear as separate word on the command line in which case the variable is replaced by its value split at whitespaces. Note that the first argument (i.e. the binary to execute) may not be a variable, and must be a literal and absolute path name. will work ... currently it does not and a systemctl show kdm@tty7.service will cause [...] Type=forking Restart=no PIDFile=/var/run/kdm.pid NotifyAccess=none RestartUSec=100ms TimeoutUSec=1min 30s ExecStartPre={ path=/bin/echo ; argv[]=/bin/echo %p %P %I %n %N %f ; ignore=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/ } ExecStart={ path=/usr/bin/%p ; argv[]=/usr/bin/%p ; ignore=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/ } [...] also a systemctl start kdm@tty7.service with xdm@service linked to /etc/systemd/system/graphical.target.wants/kdm@tty7.service procduce: systemctl status kdm@tty7.service kdm@tty7.service - X-Window Display Manager kdm on tty7 (kdm@tty7.service kdm@tty7 kdm /tty7) Loaded: loaded (/lib/systemd/system/xdm@.service) Active: failed since Thu, 25 Aug 2011 14:25:45 +0200; 10s ago Process: 3754 ExecStart=/usr/bin/%p (code=exited, status=203/EXEC) Process: 3752 ExecStartPre=/bin/echo %p %P %I %n %N %f (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/kdm@.service/tty7 Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr
participants (1)
-
Dr. Werner Fink