[Debian-live-changes] r2126 - dists/trunk/live-helper/helpers

daniel at alioth.debian.org daniel at alioth.debian.org
Sat Jun 16 21:18:37 UTC 2007


Author: daniel
Date: 2007-06-16 21:18:37 +0000 (Sat, 16 Jun 2007)
New Revision: 2126

Modified:
   dists/trunk/live-helper/helpers/lh_binary_rootfs
Log:


Modified: dists/trunk/live-helper/helpers/lh_binary_rootfs
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_rootfs	2007-06-16 19:45:44 UTC (rev 2125)
+++ dists/trunk/live-helper/helpers/lh_binary_rootfs	2007-06-16 21:18:37 UTC (rev 2126)
@@ -70,6 +70,28 @@
 # Creating directory
 mkdir -p binary/${INITFS}
 
+for STAGE in ${LH_CACHE_STAGES}
+do
+	if [ "${STAGE}" = "rootfs" ] && [ -d cache/stages_rootfs ]
+	then
+		# Removing old chroot
+		rm -rf binary/"${INITFS}"/filesystem.*
+
+		# Restoring old cache
+		mkdir -p binary/"${INITFS}"
+		${LH_ROOT_COMMAND} cp -a cache/stages_rootfs/filesystem.* binary/"${INITFS}"
+
+		if [ -n "${LH_ROOT_COMMAND}" ]
+		then
+			${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` binary
+		fi
+
+		# Creating stage file
+		Create_stagefile .stage/binary_rootfs
+		exit 0
+	fi
+done
+
 case "${LIVE_CHROOT_FILESYSTEM}" in
 	ext2)
 		# Checking depends
@@ -157,5 +179,22 @@
 		;;
 esac
 
+for STAGE in ${LH_CACHE_STAGES}
+do
+	if [ "${STAGE}" = "rootfs" ]
+	then
+		rm -rf cache/stages_rootfs
+
+		mkdir -p cache/stages_rootfs
+
+		${LH_ROOT_COMMAND} cp -a binary/"${INITFS}"/filesystem.* cache/stages_rootfs
+
+		if [ -n "${LH_ROOT_COMMAND}" ]
+		then
+			${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` cache/stages_rootfs
+		fi
+	fi
+done
+
 # Creating stage file
 Create_stagefile .stage/binary_rootfs




More information about the Debian-live-changes mailing list