Verification done on Xenial. Changing verification tags.
--
Testcase)
$ cat <<EOF | sudo tee /etc/systemd/system/fail-on-restart. [Service] ExecStart=/bin/false Restart=always EOF
$ sudo systemctl daemon-reload
Before) "Active: inactive (dead)"
$ dpkg -s systemd | grep ^Version: Version: 229-4ubuntu21.4
$ sudo systemctl start fail-on-restart
$ systemctl status -n0 fail-on-restart fail-on-restart.service Loaded: loaded (/etc/systemd/system/fail-on-restart.service; static; vendor p Active: inactive (dead)
Install/Reboot)
$ sudo apt-get install systemd $ sudo reboot
After) "Active: failed (Result: start-limit-hit) since <...>"
$ dpkg -s systemd | grep ^Version: Version: 229-4ubuntu21.5
$ systemctl status -n0 fail-on-restart fail-on-restart.service Loaded: loaded (/etc/systemd/system/fail-on-restart.service; static; vendor preset: enabled) Active: failed (Result: start-limit-hit) since Wed 2018-10-10 20:53:17 UTC; 2min 34s ago Process: 1450 ExecStart=/bin/false (code=exited, status=1/FAILURE) Main PID: 1450 (code=exited, status=1/FAILURE)
Verification done on Xenial.
Changing verification tags.
--
Testcase)
$ cat <<EOF | sudo tee /etc/systemd/ system/ fail-on- restart. /bin/false
[Service]
ExecStart=
Restart=always
EOF
$ sudo systemctl daemon-reload
Before) "Active: inactive (dead)"
$ dpkg -s systemd | grep ^Version:
Version: 229-4ubuntu21.4
$ sudo systemctl start fail-on-restart
$ systemctl status -n0 fail-on-restart
fail-on- restart. service system/ fail-on- restart. service; static; vendor p
Loaded: loaded (/etc/systemd/
Active: inactive (dead)
Install/Reboot)
$ sudo apt-get install systemd
$ sudo reboot
After) "Active: failed (Result: start-limit-hit) since <...>"
$ dpkg -s systemd | grep ^Version:
Version: 229-4ubuntu21.5
$ sudo systemctl start fail-on-restart
$ systemctl status -n0 fail-on-restart
fail-on- restart. service system/ fail-on- restart. service; static; vendor preset: enabled) /bin/false (code=exited, status=1/FAILURE)
Loaded: loaded (/etc/systemd/
Active: failed (Result: start-limit-hit) since Wed 2018-10-10 20:53:17 UTC; 2min 34s ago
Process: 1450 ExecStart=
Main PID: 1450 (code=exited, status=1/FAILURE)