Workaround for freeradius2 failing to start on reboot with PFSense 2.2 nanobsd.
-
When freeradius2 is installed on nanobsd.
The cause seems to be the ephemeral nature of files in /var, which on nanobsd exists as a ramdisk.
The freeradius2 package requires the following directories:
/var/log/radaact
/var/log/radacct/datacounter
/var/log/radacct/timecounterMy workaround is to install the shellcmd package and add the following two earlyshellcmd entries:
mkdir -p /var/log/radacct/datacounter
mkdir -p /var/log/radacct/timecounterThe -p flag tells mkdir to create the intermediate /var/log/radacct directory as well, if it is missing.
I am using this solution with PFSense 2.2.2-RELEASE (i386) nanobsd, and freeradius2 2.2.6_3 pkg v1.6.11.
This workaround should be built into the startup script for the package.
I hope this helps someone.
Cheers,
BennettKEY WORDS: freeradius2 freeradius radius nanobsd start restart boot reboot fail fails failure
-
Thanks for your workaround. In my case it did not work immediately for a regular install (not NanoBSD) with memory file system for /tmp and /var. The radius daemon won't start up at (re)boot. However, I was triggered by your install of package Shellcmd.
What worked for me is the following addition to your workaround. Add in Services->Shellcmd->Settings the following shellcmd entry:
service radiusd.sh restart
It is not nice but doesn't hurt either and is clearly a workaround to a bug in pfsense/freeradius, which was first introduced in my system after upgrading form 2.2 (my first installed pfsense release) to 2.2.1 and still present in 2.2.2 before this workaround :).
-
this worked for me as well in conjunction with Watchdog package as discussed at https://forum.pfsense.org/index.php?topic=87441.30