"uname" will tell me the version of the running kernel. How do I know if this is different from the installed kernel (i.e. the one that will be loaded on the next reboot)?
Ideally I'd like to write a script that can output "reboot needed" or "running and installed kernel match".
freebsd-version -kshows only release name and patch level. It works for binary updates, but if system updated from source it is not enough. E. g. you can update OS several times, butfreebsd-version -kwill show the same value 11.0-STABLE – citrin Dec 08 '16 at 19:39