Nanobsd: persistent read-write files?
You know - the read-write parts of the filesystem in the nanobsd version of pfSense is mounted on memory disks.
I need a file to be writeable from boot to reboot and persistent between reboots.
Is there some facility implemented in pfSense that I can use for this task?
No, not just for one file. All slices on the CF are kept read-only unless an event requires that they flip to RW, then once that finishes, it goes back to read-only.
On 2.1 there is an option to keep the filesystems read-write all the time. It would let you do what you want, but it would also defeat the purpose of using NanoBSD for its protection against excessive filesystem writes.
Depending on your media (if it's flash-based), you could expect failure sooner rather than later.
@jimp, I could create the file on every boot but I need /tmp/ and pppoe0 up to create it (it's a whois request). Also, the file is used by pfBlocker so the command needs to run before pfBlocker creates its tables. Can (early)shellcmd do this? Thanks!
Well, I have made a copy of the /etc/rc.backup_dhcpleases.sh and modified it to update/save my file via cron. Done.