https://bugzilla.novell.com/show_bug.cgi?id=758427 https://bugzilla.novell.com/show_bug.cgi?id=758427#c0 Summary: systemd unit templates don't resolve %-specifiers properly Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: All OS/Version: openSUSE 12.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: Yarny@public-files.de QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 In a systemd unit template file (a file like /etc/systemd/system/blah@.service) at least the fields "ConditionPathExists" and "Requires" have trouble handling %I. Reproducible: Always Steps to Reproduce: Here are two service files which I created in order to autostart an iaxmodem whenever a corresponding faxgetty gets started: ================= iaxmodem@.service ================ [Unit] Description = IAXmodem for /dev/%I ConditionPathExists = /etc/iaxmodem/%I Requires = asterisk.service After = asterisk.service [Service] Type = simple ExecStart = /usr/sbin/iaxmodem %I ==================================================== ============= faxgetty4ttyiax@.service ============= [Unit] Description = HylaFAX faxgetty at /dev/%I ConditionPathExists = /var/spool/fax/etc/config.%I ConditionPathExists = /etc/iaxmodem/%I Requires = iaxmodem@%I.service [Service] Type = simple Restart = on-success ExecStart = /usr/lib/fax/faxgetty /dev/%I ==================================================== The files /etc/iaxmodem/ttyiax1 and /var/spool/fax/etc/config.ttyiax1 exist. Actual Results: $ systemctl start faxgetty4ttyiax@ttyiax1.service produces
systemd[1]: Failed to add dependency on iaxmodem@%I.service, ignoring: Invalid argument in /var/log/messages and start condition failed at ... in the status output of $ systemctl status faxgetty4ttyiax@ttyiax1.service
Expected Results: $ systemctl start faxgetty4ttyiax@ttyiax1.service should start a faxgetty instance and pull in the corresponding iaxmodem service. If my understanding of the templating mechanism (on the man page of systemd.unit) is correct, such a construction is supposed to work. If it is intentional that the %-specifiers don't get resolved, please consider this bug report a feature request. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.