Test for rebooting state using systemctl, instead of the obsolete $RUNLEVEL (Closes: #8306)