At Linux we can get run level as like:
if [ "$(runlevel | sed 's/.* //')" = 6 ]; then echo "A reboot is in progress" fi
and run level 0 is for shutdown. How can I do the same for Free BSD?
Runlevel is a concept specific to
The concept of runlevel also does not exist in BSD-style init, hence no runlevels in FreeBSD.