#!/bin/bash -e
# reboot system (kernel upgrade, set chmod +x by 95secupdates)
# will be skipped if running live or REBOOT set to SKIP

chmod -x $0
[ "$REBOOT" == "SKIP" ] && exit 0
grep -qs boot=casper /proc/cmdline && exit 2

echo "rebooting due to kernel security upgrade..."
init 6

