tech-embed archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: abusing mfs to make read-only



On 5/7/07, matthew sporleder <msporleder%gmail.com@localhost> wrote:
In an effort to save my CF card some writes, I added this to my fstab:
/dev/wd0b       /var/run mfs rw,-s1m 0 0
/dev/wd0b       /var/log mfs rw,-s10m 0 0

(I would use tmpfs, but this is 3.1)

and then modified /etc/rc.d/syslogd like so: (in syslogd_precmd())
        #       Touch files in syslog.conf -- MSPO
        if [ -f /etc/syslog.conf ]; then
                awk '{ if (($2 ~ /^\/var/) && ($0 !~ /^#/)) { system("touch " $2
); } }' /etc/syslog.conf
        fi
        #       END MSPO
        return 0

This should boot and read from the CF card like normal (I'm not using
a crunchgen here) and then set the only places I write to be in
memory.

Can anyone think of another place writes might happen?

Comments appreciated,
_Matt


I also had to add:
critical_filesystems_local="/var/run /var/log"
to /etc/rc.conf.



Home | Main Index | Thread Index | Old Index