Bug 989236

Summary: systemd EnvironmentFile parser not support comment after command
Product: [Fedora] Fedora Reporter: Frantisek Hanzlik <franta>
Component: systemdAssignee: systemd-maint
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: harald, johannbg, lnykryn, msekleta, notting, plautrba, systemd-maint, vpavlin, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-29 12:00:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Frantisek Hanzlik 2013-07-28 15:26:04 UTC
Description of problem:
lines in EnvironmentFile file with comment after assigning value (as
OPTIONS="string"       # some comment
) are parsed badly. I know that 'man 5 systemd.exec' not specify this as alowed
syntax, but lots of old legacy /etc/systemd/ configuration files use this syntax, which is usual in shell. Though, for reasons of compatibility and better
file readability this should be perhaps legal syntax.

Version-Release number of selected component (if applicable):
systemd-204-9.fc19.i686

How reproducible:
Using this syntax, program started with this service unit exit with error message as "unknown option '-#'"

Comment 1 Zbigniew Jędrzejewski-Szmek 2013-10-07 02:08:15 UTC
It was a concious design decision to disallow this. I'm pretty sure we don't want to change this.

@Harald, you disabled inline comments in http://cgit.freedesktop.org/systemd/systemd/commit/?id=98f59e5. Can you provide the justification and close this?

Comment 2 Frantisek Hanzlik 2013-10-07 21:39:35 UTC
Hello Zbigniew, thank You for explication. But as I not understand what is mentioned by 'concious design' and how it relates with proclaimed
 /etc/sysconfig/SomeShellOptions compatibility, I want to know Mr. Harald opinion.

Comment 3 Harald Hoyer 2013-10-29 12:00:28 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #1)
> It was a concious design decision to disallow this. I'm pretty sure we don't
> want to change this.
> 
> @Harald, you disabled inline comments in
> http://cgit.freedesktop.org/systemd/systemd/commit/?id=98f59e5. Can you
> provide the justification and close this?

explicit order of systemd master in command