Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Aug 2005 14:47:52 GMT
From:      soc-saturnero <soc-saturnero@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 81281 for review
Message-ID:  <200508011447.j71ElqVb093239@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=81281

Change 81281 by soc-saturnero@soc-saturnero_sberta on 2005/08/01 14:46:55

	rc script for uzip mount

Affected files ...

.. //depot/projects/soc2005/freesbie/conf/rc.d/uzip#1 add
.. //depot/projects/soc2005/freesbie/scripts/clonefs.sh#2 edit

Differences ...

==== //depot/projects/soc2005/freesbie/scripts/clonefs.sh#2 (text+ko) ====

@@ -102,9 +102,15 @@
 	mkdir -p ${CLONEDIR}/uzip
 	
 	USRDEVICE=$(create_vnode ${CLONEDIR}/uzip/usr.ufs usr)
-	VARDEVICE=$(create_vnode ${CLONEDIR}/uzip/var.ufs var)
-	
-	trap "umount_md_devices ${USRDEVICE} ${VARDEVICE}; exit 1" INT
+	DEVICES=${USRDEVICE}
+
+	# When NO_UNIONFS is set, we prefer using a mdmfs var (created
+	# automatically by rc.d scripts
+	if [ -z "${NO_UNIONFS:-}" ]; then
+	    VARDEVICE=$(create_vnode ${CLONEDIR}/uzip/var.ufs var)
+	    DEVICES=${DEVICES} ${VARDEVICE}
+	fi
+	trap "umount_md_devices ${DEVICES}; exit 1" INT
     fi
 
     cd ${BASEDIR}
@@ -112,10 +118,16 @@
     find . -print -depth | cpio -pvudm ${CLONEDIR} >> ${LOGFILE} 2>&1
 
     if [ -z "${NO_COMPRESSEDFS:-}" ]; then
-	umount_md_devices ${USRDEVICE} ${VARDEVICE}
+	umount_md_devices ${DEVICES}
 	trap "" INT
 	uzip $CLONEDIR/uzip/usr.ufs $CLONEDIR/uzip/usr.uzip
-	uzip $CLONEDIR/uzip/var.ufs $CLONEDIR/uzip/var.uzip	
+	if [ -z "${NO_UNIONFS:-}" ]; then
+	    uzip $CLONEDIR/uzip/var.ufs $CLONEDIR/uzip/var.uzip	
+	fi
+
+	#Copy the rc script
+	cp ${LOCALDIR}/conf/rc.d/uzip ${CLONEDIR}/etc/rc.d/
+	chmod 555 ${CLONEDIR}/etc/rc.d/uzip
     fi
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508011447.j71ElqVb093239>