[Bug 1696206] Re: systemd drops lists concatenated with EOF
Dimitri John Ledkov
launchpad at surgut.co.uk
Tue Jun 6 22:49:36 UTC 2017
Is a unit with \ continuation lines present in Ubuntu packages?
** Changed in: systemd (Ubuntu)
Status: New => Incomplete
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1696206
Title:
systemd drops lists concatenated with EOF
Status in systemd package in Ubuntu:
Incomplete
Bug description:
Disclaimer: I originally posted this on Gallium OS's bug tracker but was told that Gallium pulls directly from upstream Ubuntu. The original bug report can be found here:
https://github.com/GalliumOS/galliumos-distro/issues/369
Release: Gallium OS
Package: systemd
When a systemd target file contains a "Conflicts" list at the end of
the file and does not provide a blank line between the end of the list
and the end of the file the list is silently dropped.
This is easier to demonstrate than it is to explain.
Take the following files:
`ServiceA.service`, `ServiceB.service`, and `ServiceC.service` are identical:
```
[Unit]
Description=This service just remains on
[Service]
Restart=always
ExecStart=/home/keeton/Permanent/Scripts/StayRunning.sh
```
`StayRunning.sh` is:
```
#!/bin/sh
while true
do
sleep 3
done
```
The three services launch a script that keeps on running indefinitely.
This target, `WillTurnOff.target`, will stop all three services as we would expect:
```
[Unit]
Description=This target will turn off Service's A, B, and C
Conflicts= \
ServiceA.service \
ServiceB.service \
ServiceC.service \
```
This target, `WillNotTurnOff.target`, will **not** stop the stop the services:
```
[Unit]
Description=This target will *not* turn off Service's A, B, and C
Conflicts= \
ServiceA.service \
ServiceB.service \
ServiceC.service \
```
Notice the difference. `WillTurnOff.target` contains a blank line
between the last item on the list and the end of the file.
Several things to note:
* I'm pretty sure that this is a bug in systemd, but Gallium's on systemd version 229, which is more than two versions behind the latest version.
* I'm guessing that systemd is concatenating the EOF onto the list since the list ends with a backslash.
* Shouldn't systemd at least spit out a warning that something is wrong?
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1696206/+subscriptions
More information about the foundations-bugs
mailing list