Bug 1428110 - RFE: RuntimeDirectory= should resolve %i and other specifiers
Summary: RFE: RuntimeDirectory= should resolve %i and other specifiers
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: Branislav Blaškovič
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-01 19:45 UTC by Nilesh Parmar
Modified: 2017-08-01 09:14 UTC (History)
3 users (show)

Fixed In Version: systemd-219-33.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 09:14:52 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2297 normal SHIPPED_LIVE systemd bug fix and enhancement update 2017-08-01 12:40:16 UTC

Description Nilesh Parmar 2017-03-01 19:45:36 UTC
Description of problem:
RFE: RuntimeDirectory= should resolve %i and other specifiers

Version-Release number of selected component (if applicable):
systemd-219-30.el7_3.6

How reproducible:
Always

Steps to Reproduce:
1] Create simple systemd template unit file:

[root@dhcp5-48 ~]# cat /etc/systemd/system/demo@.service 
[Unit]
Description = demo %i
[Service]
ExecStart=/bin/sleep %i
Restart=on-failure
RuntimeDirectory=demotest%i
RuntimeDirectoryMode=755
[Install]
WantedBy=multi-user.target

[root@dhcp5-48 ~]# systemctl daemon-reload 
[root@dhcp5-48 ~]# systemctl start demo@102; systemctl status demo@102
[root@dhcp5-48 ~]# ll /run/demotest%i/

Actual results:
RuntimeDirectory currently ignores %i in instanceable service files

Expected results:
RuntimeDirectory=%i for instance would create /run/%i

Additional info: 

Github PR: https://bugs.freedesktop.org/show_bug.cgi?id=90178
           https://github.com/systemd/systemd/pull/1292

Comment 2 Lukáš Nykrýn 2017-03-02 08:41:38 UTC
https://github.com/lnykryn/systemd-rhel/pull/97

Comment 4 Lukáš Nykrýn 2017-03-20 14:14:09 UTC
fix merged to upstream staging branch ->
https://github.com/lnykryn/systemd-rhel/commit/2520d152da83096b42fe7d27cf0bf97a62b50fac
-> post

Comment 7 errata-xmlrpc 2017-08-01 09:14:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2297


Note You need to log in before you can comment on or make changes to this bug.