Date: Fri, 2 Mar 2007 22:45:17 -0500 From: Yoshihiro Ota <ota@j.email.ne.jp> To: current@freebsd.org Subject: [Patch] Multiple swap files Message-ID: <20070302224517.18a1b9d1.ota@j.email.ne.jp>
index | next in thread | raw e-mail
[-- Attachment #1 --]
I just started using PIII 260MHz with 96MB RAM and 4G HD.
I didn't create swap device, but swap space became necessary later.
Because of how I partitioned, I needed more than one swapfile.
So, now it allows.
Regards,
Hiro
[-- Attachment #2 --]
Index: addswap
===================================================================
RCS file: /home/ncvs/src/etc/rc.d/addswap,v
retrieving revision 1.6
diff -u -r1.6 addswap
--- addswap 17 Jan 2006 19:29:31 -0000 1.6
+++ addswap 3 Mar 2007 03:36:08 -0000
@@ -18,16 +18,19 @@
addswap_start()
{
- case ${swapfile} in
- [Nn][Oo] | '')
- ;;
- *)
- if [ -w "${swapfile}" ]; then
- echo "Adding ${swapfile} as additional swap"
- mdev=`mdconfig -a -t vnode -f ${swapfile}` && swapon /dev/${mdev}
- fi
- ;;
- esac
+ for i in ${swapfile}
+ do
+ case ${i} in
+ [Nn][Oo] | '')
+ ;;
+ *)
+ if [ -w "${i}" ]; then
+ echo "Adding ${i} as additional swap"
+ mdev=`mdconfig -a -t vnode -f ${i}` && swapon /dev/${mdev}
+ fi
+ ;;
+ esac
+ done
}
load_rc_config $name
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070302224517.18a1b9d1.ota>
