1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-04 17:47:03 +03:00

systemctl: short cut things if we aren't root and the user requested a reboot to suppress unnecessary wall message

This commit is contained in:
Lennart Poettering 2010-07-08 21:31:23 +02:00
parent d47b555bb6
commit bc8c2f5c54

View File

@ -3156,6 +3156,11 @@ static int start_with_fallback(DBusConnection *bus) {
static int halt_main(DBusConnection *bus) {
int r;
if (geteuid() != 0) {
log_error("Must to be root.");
return -EPERM;
}
if (!arg_dry && !arg_immediate)
return start_with_fallback(bus);