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>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --Multipart=_Fri__2_Mar_2007_22_45_17_-0500_8WuFkNb2tELI38uk Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 --Multipart=_Fri__2_Mar_2007_22_45_17_-0500_8WuFkNb2tELI38uk Content-Type: text/x-diff; name="multi-addswap.diff" Content-Disposition: attachment; filename="multi-addswap.diff" Content-Transfer-Encoding: 7bit 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 --Multipart=_Fri__2_Mar_2007_22_45_17_-0500_8WuFkNb2tELI38uk--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070302224517.18a1b9d1.ota>