sane-reboot: fix operation on servo
This commit is contained in:
parent
2d07ff966b
commit
1448cb4444
|
@ -7,8 +7,10 @@ shift
|
|||
host="$(hostname)"
|
||||
if [ "$host" = "$target" ]
|
||||
then
|
||||
# N.B.: anything other than just `reboot` with no args requires `sudo` privilegs (to write to /run/systemd/)
|
||||
reboot "$@"
|
||||
# N.B.: anything other than just `reboot` with no args requires `sudo` privileges (to write to /run/systemd/).
|
||||
# `systemctl reboot -i` tells systemd to ignore inhibitors (i.e. other users logged in).
|
||||
reboot "$@" || \
|
||||
systemctl reboot -i "$@"
|
||||
else
|
||||
echo "WRONG MACHINE. you're on $host."
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user