Mailinglist Archive: opensuse-factory (806 mails)

< Previous Next >
[opensuse-factory] Re: Systemd Service % specifiers in ExecStart
Le jeudi 25 août 2011 à 14:27 +0200, Dr. Werner Fink a écrit :

does anyone know how systemd.service(5):

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

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

According to upstream, you are not supposed to create path "on the fly"
like this. And ExecStart is not started in a shell, so it doesn't expand
everything like a shell.

If %p and other don't work, please open a bugreport on against systemd.

Frederic Crozat <fcrozat@xxxxxxxxxx>

To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups