[SCM] live-boot branch, tmp-persistent-custom, updated. debian/3.0_a25-1-30-g5fc05fe

Tails developers amnesia at boum.org
Thu Feb 16 14:58:06 UTC 2012


The following commit has been merged in the tmp-persistent-custom branch:
commit 37b6163a3b26ccaaea909f8feea144ddc2fef537
Author: Tails developers <amnesia at boum.org>
Date:   Tue Feb 14 16:45:14 2012 +0100

    Some minor cleanups.

diff --git a/scripts/live-helpers b/scripts/live-helpers
index 74a3a80..9423d2d 100644
--- a/scripts/live-helpers
+++ b/scripts/live-helpers
@@ -1068,12 +1068,12 @@ link_files ()
 			then
 				mkdir -p "${dest}"
 				prev="$(dirname "${dest}")"
-				chown $(stat -c %u:%g "${prev}") "${dest}"
-				chmod $(stat -c %a "${prev}") "${dest}"
+				chown --reference "${prev}" "${dest}"
+				chmod --reference "${prev}" "${dest}"
 			fi
 			link_files "${src}" "${dest}" "${src_mask}"
 		else
-			if [ -n "${src_mask}" ];
+			if [ -n "${src_mask}" ]
 			then
 				src="$(echo ${src} | sed "s|^${src_mask}||")"
 			fi
@@ -1252,16 +1252,11 @@ get_custom_mounts () {
 	# We sort the list according to destination so we're sure that
 	# we won't hide a previous mount. We also ignore duplicate
 	# destinations in a more or less arbitrary way.
-	[ -e "${bindings}" ] && sort -k2 -sbu ${bindings} >> ${custom_mounts}
-	rm ${bindings}
+	[ -e "${bindings}" ] && sort -k2 -sbu ${bindings} >> ${custom_mounts} && rm ${bindings}
 
 	# After all mounts are considered we add symlinks so they
 	# won't be hidden by some mount.
-	[ -e "${links}" ] && sort -k2 -sbu ${links} >> ${custom_mounts}
-	rm ${links}
-
-	rm -f ${bindings} ${links} 2> /dev/null
-	echo ${custom_mounts}
+	[ -e "${links}" ] && sort -k2 -sbu ${links} >> ${custom_mounts} && rm ${links}
 }
 
 do_custom_mounts () {

-- 
live-boot



More information about the debian-live-changes mailing list