systemd-systemctl-native: don't care about line endings

Message ID 20190917203030.29832-1-ross.burton@intel.com
State Accepted
Commit 7aaa9200b5ba2cba92ee1ed7003d54848498b37d
Headers show
Series
  • systemd-systemctl-native: don't care about line endings
Related show

Commit Message

Ross Burton Sept. 17, 2019, 8:30 p.m.
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>

---
 meta/recipes-core/systemd/systemd-systemctl/systemctl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.20.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index 8837f54e166..ebac863739a 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -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: