[Debian-live-changes] r1563 - in dists/trunk/live-initramfs: bin docs scripts

daniel at alioth.debian.org daniel at alioth.debian.org
Fri May 18 14:51:25 UTC 2007


Author: daniel
Date: 2007-05-18 14:51:25 +0000 (Fri, 18 May 2007)
New Revision: 1563

Modified:
   dists/trunk/live-initramfs/bin/live-snapshot
   dists/trunk/live-initramfs/docs/ChangeLog
   dists/trunk/live-initramfs/scripts/live
   dists/trunk/live-initramfs/scripts/live-helpers
Log:


Modified: dists/trunk/live-initramfs/bin/live-snapshot
===================================================================
--- dists/trunk/live-initramfs/bin/live-snapshot	2007-05-18 14:37:42 UTC (rev 1562)
+++ dists/trunk/live-initramfs/bin/live-snapshot	2007-05-18 14:51:25 UTC (rev 1563)
@@ -94,7 +94,7 @@
 	echo "  -d, --device: specifies the output snapshot device (default: none)."
 	echo "  -o, --output: specifies the output image file (default: $type dependent)."
     echo "  -r, --resync-string: internally used to resync previous made snapshots."
-	echo "  -t, --type: specifies the snapshot type between \"squashfs\", \"ext2\" or \"cpio\".gz archive (default: cpio)"
+	echo "  -t, --type: specifies the snapshot type between \"squashfs\", \"ext2\", \"ext3\" or \"cpio\".gz archive (default: cpio)"
     echo -e "\nLook at live-snapshot(1) man page for more information."
 	exit 0
 }
@@ -138,7 +138,7 @@
 		cpio)
 			( cd "${COW}" && find . -path '*.wh.*' -prune -o -print0 | cpio --quiet -o0 -H newc | gzip -9c > "${DEST}" ) || exit 1
 			;;
-		ext2)
+		ext2|ext3)
 			DU_DIM="`du -ks ${COW} | cut -f1`"
 			REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here...
 			genext2fs --size-in-blocks=${REAL_DIM} --reserved-blocks=0 --root="${COW}" "${DEST}" || exit 1
@@ -242,7 +242,7 @@
 				TYPE="squashfs" ;;
 			"")
 				TYPE="ext2" ;;
-			*.ext2)
+			*.ext2|*.ext3)
 				TYPE="ext2" ;;
 			*)
 				Usage "Unregognized String" ;;
@@ -257,7 +257,7 @@
 		fi
 
 		case "${SNAP_TYPE}" in
-			"cpio"|"squashfs"|"ext2")
+			"cpio"|"squashfs"|"ext2"|"ext3")
 				TYPE="${SNAP_TYPE}"
 				;;
 			"")

Modified: dists/trunk/live-initramfs/docs/ChangeLog
===================================================================
--- dists/trunk/live-initramfs/docs/ChangeLog	2007-05-18 14:37:42 UTC (rev 1562)
+++ dists/trunk/live-initramfs/docs/ChangeLog	2007-05-18 14:51:25 UTC (rev 1563)
@@ -10,6 +10,8 @@
 	* scripts/live, scripts/live-bottom/25configure_init:
 	  - Added check for 'noautologin' bootparameter to disable automatic
 	    terminal login.
+	* bin/live-snapshot, scripts/live:
+	  - Also recognize ext3, but treat it like ext2.
 
 2007-06-12  Daniel Baumann  <daniel at debian.org>
 

Modified: dists/trunk/live-initramfs/scripts/live
===================================================================
--- dists/trunk/live-initramfs/scripts/live	2007-05-18 14:37:42 UTC (rev 1562)
+++ dists/trunk/live-initramfs/scripts/live	2007-05-18 14:51:25 UTC (rev 1563)
@@ -135,6 +135,7 @@
     if [ -d "$path/live" ]; then
         if [ "$(echo $path/live/*.squashfs)" != "$path/live/*.squashfs" ] ||
             [ "$(echo $path/live/*.ext2)" != "$path/live/*.ext2" ] ||
+            [ "$(echo $path/live/*.ext3)" != "$path/live/*.ext3" ] ||
             [ "$(echo $path/live/*.dir)" != "$path/live/*.dir" ]; then
             return 0
         fi
@@ -144,7 +145,7 @@
 
 get_backing_device() {
     case "$1" in
-        *.squashfs|*.ext2)
+        *.squashfs|*.ext2|*.ext3)
             echo $(setup_loop "$1" "loop" "/sys/block/loop*" '0' "${LIVE_MEDIA_ENCRYPTION}")
             ;;
         *.dir)
@@ -171,6 +172,7 @@
     rootmnt="$2"
     if match_files_in_dir "$directory/live/*.squashfs" ||
         match_files_in_dir "$directory/live/*.ext2" ||
+        match_files_in_dir "$directory/live/*.ext3" ||
         match_files_in_dir "$directory/live/*.dir"; then
         setup_unionfs "$directory/live" "$rootmnt"
     else
@@ -354,13 +356,13 @@
     snap_mount="${2}"
     snap_type="${3}"
 
-    snapdata=$(find_files "${snap_label}.squashfs ${snap_label}.cpio.gz ${snap_label}.ext2")
+    snapdata=$(find_files "${snap_label}.squashfs ${snap_label}.cpio.gz ${snap_label}.ext2 ${snap_label}.ext3")
     if [ ! -z "${snapdata}" ]; then
         snapdev="$(echo ${snapdata} | cut -f1 -d ' ')"
         snapback="$(echo ${snapdata} | cut -f2 -d ' ')"
         snapfile="$(echo ${snapdata} | cut -f3 -d ' ')"
-        if echo "${snapfile}" | grep -qs '\(squashfs\|ext2\)'; then
-            # squashfs or ext2 snapshot
+        if echo "${snapfile}" | grep -qs '\(squashfs\|ext2\|ext3\)'; then
+            # squashfs or ext2/ext3 snapshot
             dev=$(get_backing_device "${snapback}/${snapfile}")
             if ! do_snap_copy "${dev}" "${snap_mount}" "${snap_type}"; then
                  log_warning_msg "Impossible to include the ${snapfile} Snapshot"
@@ -432,7 +434,7 @@
         done
     else
         # If ${MODULE}.lst does not exist, create a list of images
-        for image_type in "ext2" "squashfs" "dir"; do
+        for image_type in "ext2" "ext3" "squashfs" "dir"; do
             for image in "${image_directory}"/*."${image_type}"; do
 	        if [ -e "${image}" ]; then
 		    image_string="${image_string} ${image}";
@@ -573,8 +575,8 @@
                 fi
             done
         elif [ "${fstype}" = "squashfs" -o \
-                "${fstype}" = "ext3" -o \
-                "${fstype}" = "ext2" ]; then
+                "${fstype}" = "ext2" -o \
+                "${fstype}" = "ext3" ]; then
             # This is an ugly hack situation, the block device has
             # an image directly on it.  It's hopefully
             # live-initramfs, so take it and run with it.

Modified: dists/trunk/live-initramfs/scripts/live-helpers
===================================================================
--- dists/trunk/live-initramfs/scripts/live-helpers	2007-05-18 14:37:42 UTC (rev 1562)
+++ dists/trunk/live-initramfs/scripts/live-helpers	2007-05-18 14:51:25 UTC (rev 1563)
@@ -204,7 +204,7 @@
 }
 
 find_files()
-# return the first of $filenames found on vfat and ext2 devices
+# return the first of $filenames found on vfat and ext2/ext3 devices
 # FIXME: merge with above function
 {
     filenames="${1}"
@@ -213,7 +213,7 @@
         for dev in $(subdevices "${sysblock}"); do
             devname=$(sys2dev "${dev}")
             devfstype="$(get_fstype ${devname})"
-            if [ "${devfstype}" = "vfat" ] ||  [ "${devfstype}" = "ext2" ] ; then # FIXME: all supported block devices should be scanned
+            if [ "${devfstype}" = "vfat" ] ||  [ "${devfstype}" = "ext2" ] || [ "${devfstype}" = "ext3" ]; then # FIXME: all supported block devices should be scanned
                 mkdir -p "${snap_backing}"
                 try_mount "${devname}" "${snap_backing}" "ro"
                 for filename in ${filenames}; do




More information about the Debian-live-changes mailing list