Created
May 28, 2009 23:05
-
-
Save davidphasson/119652 to your computer and use it in GitHub Desktop.
OpenBSD based router configs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 1 * * * /bin/mfs-sync |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/dev/wd0a / ffs rw 1 1 | |
/dev/wd0d /rvar ffs ro,noatime 1 2 | |
swap /var mfs rw,-P=/rvar,-s=65535,noexec,nosuid,nodev 0 0 | |
# Some MFS Stuff: | |
# -s: size of disk in sectors (usually 512) | |
# -b: block size in bytes (ironically, usually 16k) | |
# -f: frag size in bytes (usually 2k) | |
# -i: inode density in bytes (usually 8192) - max inode size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat /bin/mfs-sync | |
#!/bin/sh | |
MFS='/dev/wd0d' # MFS backup partiton. | |
sudo mount -uw $MFS && mount | grep $MFS | |
printf "Synchronizing in memory var with var backup ... " | |
/usr/local/bin/rsync -vhaz --delete -f "- *.sock" -f "- | |
**/empty/dev/log" -f "- run/pptp/*" -f "- named/dev/*" /var/ /rvar/ | |
sudo mount -ur $MFS && mount | grep $MFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment