tech-embed archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
abusing mfs to make read-only
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
Home |
Main Index |
Thread Index |
Old Index