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