How do I check whether pfSense was not cleanly shutdown?
-
where would I look for indication that is the case, aside from watching the console during a boot up?
-
open the console and launch a fsck, it will run in read only mode and it will tell you if the system need to be corrected
-
That tells me if the filesystem has problems, but an unclean shutdown might not necessarily cause a FS problem.
how can I tell it didn't shutdown properly?
-
http://freebsd.1045724.x6.nabble.com/How-to-check-if-not-clean-shutdown-td6258842.html
It may not be possible unless pfSense has some kind of custom handler for that.
-
type on console
last reboot
idk if it tell you about unclean/clean reboot, i don't have unclean reboot to check
-
@KOM said in How do I check whether pfSense was not cleanly shutdown?:
http://freebsd.1045724.x6.nabble.com/How-to-check-if-not-clean-shutdown-td6258842.html
It may not be possible unless pfSense has some kind of custom handler for that.
This is promising.
Does anyone know how to place a shutdown hook in pfSense? Is there a facility to make this easier?
-
@kiokoman said in How do I check whether pfSense was not cleanly shutdown?:
last reboot
Here: https://unix.stackexchange.com/a/278166/18568. Especially this part. I will try it in FreeBSD next time I suspect an unclean shutdown:
-
https://forums.freebsd.org/threads/execute-rc-d-script-at-shutdown.53304/
https://www.freebsd.org/doc/en_US.ISO8859-1/articles/rc-scripting/rcng-hookup.html
You put startup scripts and kill scripts in /etc/rc.d.