pid1: improve the check guarding unit_file_preset_all()
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Sep 2017 13:44:48 +0000 (15:44 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Sep 2017 17:07:44 +0000 (19:07 +0200)
commit81fe6cdee2a9f029259aba48ea590614d7678abf
tree144d6108d04449942fdb4a5519ff33e6ba4da6e2
parentdbbf424c8b77c1649e822c20c0b1fee1d2cfd93d
pid1: improve the check guarding unit_file_preset_all()

When running in systemd-analyze verify, first_boot was initialized to -1
and never changed, so we'd try to run unit_file_preset_all(). Change the
check to > 0 which is more correct. Also, add a separate test for !test_run,
since we wouldn't want to run presets even if we were in first boot
(or /etc was empty for whatever other reason).
src/core/manager.c