]> code.ossystems Code Review - openembedded-core.git/commitdiff
systemd-systemctl-native: don't care about line endings
authorRoss Burton <ross.burton@intel.com>
Tue, 17 Sep 2019 20:30:30 +0000 (21:30 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 Sep 2019 09:54:26 +0000 (10:54 +0100)
It's possible for a service file to accidentally contain mixed line endings, but
the string cleanup code was assuming Unix endings.

[ YOCTO #13535 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/systemd/systemd-systemctl/systemctl

index 8837f54e16605bb211dba51e2710c79e9d57bd2f..ebac863739ac628f66ec2e7140e93f3c84cc3432 100755 (executable)
@@ -57,7 +57,7 @@ class SystemdFile():
                 if skip_re.match(line):
                     continue
 
-                line = line.rstrip("\n")
+                line = line.strip()
                 m = section_re.match(line)
                 if m:
                     if m.group('section') not in self.sections: