about summary refs log tree commit diff
path: root/shutdown.d/90-kexec.sh
blob: b5c8ad07ffa475fffc9b14a8eb8a0bc6c35d1a9d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
if [ -z "$VIRTUALIZATION" ]; then
    # test -x returns false on a noexec mount, hence using find to detect x bit
    if [ -n "$(find /run/runit/reboot -perm -u+x 2>/dev/null)" ] &&
        command -v kexec >/dev/null
    then
        msg "Triggering kexec..."
        kexec -e 2>/dev/null
        # not reached when kexec was successful.
    fi
fi