Browse Source

vbootstrap-0.0.51: aufs 対応

git-svn-id: http://trac.vinelinux.org/repos/projects/vbootstrap/trunk@5504 ec354946-7b23-47d6-9f5a-488ba84defc7
daisuke 11 years ago
parent
commit
b8a15522ed
3 changed files with 21 additions and 7 deletions
  1. 8 3
      libvbuilder.sh.in
  2. 5 1
      vbootstrap-vl.spec
  3. 8 3
      vbuilder.sh.in

+ 8 - 3
libvbuilder.sh.in

@@ -456,9 +456,14 @@ mount-chroot-mount(){
 	unionfs_dir)
 	    if [ $with_unionfs -eq 1 ]; then
 		[ -d ${UNIONFS_ROOT} ] || mkdir -p ${UNIONFS_ROOT}
-		[ -z "$(mount | grep ${UNIONFS_ROOT})" ] && \
-		    mount -t unionfs -o dirs=${UNIONFS_ROOT}=rw:${BUILD_ROOT}=ro unionfs ${BUILD_ROOT}
-		unionctl ${BUILD_ROOT} --list
+		if ( /sbin/modprobe aufs >& /dev/null ) ; then
+		    [ -z "$(mount | grep ${UNIONFS_ROOT})" ] && \
+		        mount -t aufs -o br=${UNIONFS_ROOT}=rw:${BUILD_ROOT}=ro aufs ${BUILD_ROOT}
+		else
+		    [ -z "$(mount | grep ${UNIONFS_ROOT})" ] && \
+		        mount -t unionfs -o dirs=${UNIONFS_ROOT}=rw:${BUILD_ROOT}=ro unionfs ${BUILD_ROOT}
+		    unionctl ${BUILD_ROOT} --list
+		fi
 	    fi
 	    ;;
 	*)

+ 5 - 1
vbootstrap-vl.spec

@@ -1,7 +1,7 @@
 # This package is maintained on trac svn repository. Please do not change on local.
 # If you find a BUG, please report to Vine@vinelinux.org or mailing list or BTS.
 
-%define version 0.0.50
+%define version 0.0.51
 
 Summary: bootstrap scripts to create a basic Vine Linux system
 Summary(ja): Vine Linux の基本システムを作成するためのスクリプト
@@ -84,6 +84,10 @@ vbuilder は vbootstrap を利用して chroot 環境の構築し、
 
 
 %changelog
+* Fri Jan 27 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.0.51-1
+- update vbuilder.sh.in, libvbuilder.sh.in
+  - support aufs
+
 * Thu Jan 26 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.0.50-1
 - update 6.0_{i386,x86_64}.sh
   - install nss before glibc on vbootstrap

+ 8 - 3
vbuilder.sh.in

@@ -521,9 +521,14 @@ mount-chroot-mount(){
 	unionfs_dir)
 	    if [ $with_unionfs -eq 1 ]; then
 		[ -d ${UNIONFS_ROOT} ] || mkdir -p ${UNIONFS_ROOT}
-		[ -z "$(mount | grep ${UNIONFS_ROOT})" ] && \
-		    mount -t unionfs -o dirs=${UNIONFS_ROOT}=rw:${BUILD_ROOT}=ro unionfs ${BUILD_ROOT}
-		unionctl ${BUILD_ROOT} --list
+		if ( /sbin/modprobe aufs >& /dev/null ) ; then
+		    [ -z "$(mount | grep ${UNIONFS_ROOT})" ] && \
+		        mount -t aufs -o br=${UNIONFS_ROOT}=rw:${BUILD_ROOT}=ro aufs ${BUILD_ROOT}
+		else
+		    [ -z "$(mount | grep ${UNIONFS_ROOT})" ] && \
+		        mount -t unionfs -o dirs=${UNIONFS_ROOT}=rw:${BUILD_ROOT}=ro unionfs ${BUILD_ROOT}
+		    unionctl ${BUILD_ROOT} --list
+		fi
 	    fi
 	    ;;
 	*)