File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 914914
915915nixosReboot () {
916916 step Rebooting
917+
918+ # disable debug output temporarily to prevent log spam
919+ set +x
920+
921+ local inhibited
922+ inhibited=$(
923+ runSsh sh << SSH
924+ if command -v systemd-inhibit 2>/dev/null; then
925+ systemd-inhibit --list | grep "shutdown"
926+ fi
927+ SSH
928+ )
929+ if [[ -n " ${inhibited} " ]]; then
930+ echo " WARNING: Reboot is currently inhibited. Manual reboot may be required. Run 'systemd-inhibit --list' on the target for further details" 2>&1
931+ if [[ -n ${enableDebug} ]]; then
932+ echo " ${inhibited} " 2>&1
933+ fi
934+ fi
935+
936+ if [[ -n ${enableDebug} ]]; then
937+ set -x
938+ fi
939+
917940 runSsh sh << SSH
918941 if command -v zpool >/dev/null && [ "\$ (zpool list)" != "no pools available" ]; then
919942 # we always want to export the zfs pools so people can boot from it without force import
You can’t perform that action at this time.
0 commit comments