vnconfig ${swapfile}

Skip Ford skip.ford at verizon.net
Sat Oct 18 03:58:01 PDT 2003


Use vnconfig to enable ${swapfile} instead of mdconfig.

Index: addswap
===================================================================
RCS file: /home/dcvs/src/etc/rc.d/addswap,v
retrieving revision 1.1
diff -u -r1.1 addswap
--- addswap	24 Jul 2003 06:35:37 -0000	1.1
+++ addswap	18 Oct 2003 14:49:46 -0000
@@ -23,9 +23,9 @@
 	[Nn][Oo] | '')
 		;;
 	*)
-		if [ -w "${swapfile}" -a -c /dev/mdctl ]; then
+		if [ -w "${swapfile}" -a -c /dev/vn0c ]; then
 			echo "Adding ${swapfile} as additional swap"
-			mdev=`mdconfig -a -t vnode -f ${swapfile}` && swapon /dev/${mdev}
+			vnconfig -e vn0c ${swapfile} swap
 		fi
 		;;
 	esac

-- 
Skip





More information about the Submit mailing list