[SCM] live-boot branch, debian-old-2.0, updated. debian/2.0.6-1-1-g2e09ee3
Daniel Baumann
daniel at debian.org
Wed Sep 29 08:37:15 UTC 2010
The following commit has been merged in the debian-old-2.0 branch:
commit 2e09ee3e58cd15af47149e7c9d86baa9890526b0
Author: Michal Suchanek <hramrach at centrum.cz>
Date: Wed Sep 29 10:37:15 2010 +0200
Adding initial support for unionmount.
diff --git a/hooks/live b/hooks/live
index 3174d17..b5d43f2 100755
--- a/hooks/live
+++ b/hooks/live
@@ -251,3 +251,10 @@ then
#mkdir -p $DESTDIR/etc
#cp -p /etc/nsswitch.conf $DESTDIR/etc
fi
+
+if [ "${LIVE_UNIONMOUNT}" = "true" ]
+then
+ # UnionMount
+ # only mount from patched util-linux can do this currently
+ copy_exec /bin/mount /bin/mount_full
+fi
diff --git a/scripts/live b/scripts/live
index f257218..4b1b92d 100755
--- a/scripts/live
+++ b/scripts/live
@@ -1206,9 +1206,16 @@ setup_unionfs ()
log_warning_msg "Unknown file system type on ${backdev} (${image}), assuming ${fstype}."
fi
- mkdir -p "${croot}/${imagename}"
- log_begin_msg "Mounting \"${image}\" on \"${croot}${imagename}\" via \"${backdev}\""
- mount -t "${fstype}" -o ro,noatime "${backdev}" "${croot}/${imagename}" || panic "Can not mount ${backdev} (${image}) on ${croot}/${imagename}" && rofsstring="${croot}/${imagename}=${roopt}:${rofsstring}" && rofslist="${croot}/${imagename} ${rofslist}"
+ if [ "${UNIONTYPE}" != "unionmount" ]
+ then
+ mpoint="${croot}/${imagename}"
+ rofsstring="${mpoint}=${roopt}:${rofsstring}" && rofslist="${mpoint} ${rofslist}"
+ else
+ mpoint="${rootmnt}"
+ fi
+ mkdir -p "${mpoint}"
+ log_begin_msg "Mounting \"${image}\" on \"${mpoint}\" via \"${backdev}\""
+ mount -t "${fstype}" -o ro,noatime "${backdev}" "${mpoint}" || panic "Can not mount ${backdev} (${image}) on ${mpoint}"
log_end_msg
fi
done
@@ -1322,6 +1329,9 @@ setup_unionfs ()
cow_mountopt="rw,noatime,mode=755"
fi
+ if [ "${UNIONTYPE}" != "unionmount" ]
+ then
+
if [ "${cow_fstype}" = "nfs" ]
then
log_begin_msg \
@@ -1332,6 +1342,7 @@ setup_unionfs ()
mount -t ${cow_fstype} -o ${cow_mountopt} ${cowdevice} /cow || \
panic "Can not mount ${cowdevice} (o: ${cow_fstype}) on /cow"
fi
+ fi
rofscount=$(echo ${rofslist} |wc -w)
@@ -1376,6 +1387,10 @@ setup_unionfs ()
pidof unionfs-fuse >> /dev/.initramfs/varrun/sendsigs.omit || true
;;
+ unionmount)
+ mount_full -t ${cow_fstype} -o noatime,union,${cow_mountopt} ${cowdevice} "${rootmnt}" || panic "${UNIONTYPE} ${cowdevice} on ${rootmnt} failed with option noatime,union,${cow_mountopt}"
+ ;;
+
*)
mount -t ${UNIONTYPE} -o noatime,${noxino_opt}dirs=/cow=rw:${rofsstring} ${UNIONTYPE} "${rootmnt}" || panic "mount ${UNIONTYPE} on ${rootmnt} failed with option noatime,${noxino_opt}dirs=/cow=rw:${rofsstring}"
;;
--
live-boot
More information about the debian-live-changes
mailing list