mirror of
https://github.com/systemd/systemd.git
synced 2025-02-07 05:57:46 +03:00
systemctl: skip writing of utmp if we booted using systemd, under the assumption that systemd-update-utmp is used
This commit is contained in:
parent
36c32ba297
commit
d90e1a301d
2
fixme
2
fixme
@ -1,7 +1,7 @@
|
||||
* dot output for --test showing the 'initial transaction'
|
||||
|
||||
* check 'disable'
|
||||
<Viking-Ice> "Warning: Unit file changed in disk, 'systemctl --system daemon-reload' recomended
|
||||
<Viking-Ice> "Warning: Unit file changed in disk, 'systemctl --system daemon-reload' recommended
|
||||
<kay> when does it do that?
|
||||
<Viking-Ice> if you disable the service
|
||||
|
||||
|
@ -144,7 +144,6 @@ finish:
|
||||
set_free(MAKE_SET(s));
|
||||
|
||||
return r;
|
||||
|
||||
}
|
||||
|
||||
int fdset_cloexec(FDSet *fds, bool b) {
|
||||
|
@ -4680,9 +4680,12 @@ static int halt_main(DBusConnection *bus) {
|
||||
if (!arg_dry && !arg_immediate)
|
||||
return start_with_fallback(bus);
|
||||
|
||||
if (!arg_no_wtmp)
|
||||
if ((r = utmp_put_shutdown(0)) < 0)
|
||||
if (!arg_no_wtmp) {
|
||||
if (sd_booted() > 0)
|
||||
log_debug("Not writing utmp record, assuming that systemd-update-utmp is used.");
|
||||
else if ((r = utmp_put_shutdown(0)) < 0)
|
||||
log_warning("Failed to write utmp record: %s", strerror(-r));
|
||||
}
|
||||
|
||||
if (!arg_no_sync)
|
||||
sync();
|
||||
|
Loading…
x
Reference in New Issue
Block a user