From: Evgeni Golov Date: Wed, 14 Aug 2013 06:48:56 +0000 (+0200) Subject: more forwardporting \o/ X-Git-Tag: debian/4.0_a13-1+grml.1~6 X-Git-Url: http://git.grml.org/?p=live-boot-grml.git;a=commitdiff_plain;h=2130827a370a3721ca59331bfe2341696e909e8f more forwardporting \o/ --- diff --git a/debian/patches/42_restore_support_for_custom-ov_persistence.patch b/debian/patches/42_restore_support_for_custom-ov_persistence.patch deleted file mode 100644 index e99d40b..0000000 --- a/debian/patches/42_restore_support_for_custom-ov_persistence.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 6ec8937c83b321e4a56f264f9e0f5f0a8dd61c6e Mon Sep 17 00:00:00 2001 -From: Evgeni Golov -Date: Mon, 17 Dec 2012 16:54:33 +0100 -Subject: [PATCH] restore support for persistence media with LABEL=custom-ov - ---- - scripts/boot/9990-aaa-fixme.sh | 1 + - scripts/boot/9990-overlay.sh | 7 ++++++- - 2 files changed, 7 insertions(+), 1 deletion(-) - ---- a/scripts/boot/9990-aaa-fixme.sh -+++ b/scripts/boot/9990-aaa-fixme.sh -@@ -43,6 +43,7 @@ - old_root_overlay_label="live-rw" - old_home_overlay_label="home-rw" - custom_overlay_label="persistence" -+old_custom_overlay_label="custom-ov" - persistence_list="persistence.conf" - old_persistence_list="live-persistence.conf" - ---- a/scripts/boot/9990-overlay.sh -+++ b/scripts/boot/9990-overlay.sh -@@ -210,7 +210,7 @@ - - if is_in_comma_sep_list overlay ${PERSISTENCE_METHOD} - then -- overlays="${old_root_overlay_label} ${old_home_overlay_label} ${custom_overlay_label}" -+ overlays="${old_root_overlay_label} ${old_home_overlay_label} ${custom_overlay_label} ${old_custom_overlay_label}" - fi - - local overlay_devices -@@ -238,6 +238,11 @@ - device="${media#*=}" - overlay_devices="${overlay_devices} ${device}" - ;; -+ -+ ${old_custom_overlay_label}=*) -+ device="${media#*=}" -+ overlay_devices="${overlay_devices} ${device}" -+ ;; - esac - done - fi diff --git a/debian/patches/42_restore_support_for_old_persistence.patch b/debian/patches/42_restore_support_for_old_persistence.patch new file mode 100644 index 0000000..7f86dd2 --- /dev/null +++ b/debian/patches/42_restore_support_for_old_persistence.patch @@ -0,0 +1,96 @@ +From: Evgeni Golov +Subject: restore support for old persistence media + +diff --git a/scripts/boot/9990-aaa-fixme.sh b/scripts/boot/9990-aaa-fixme.sh +index 416d6b4..74517e8 100755 +--- a/scripts/boot/9990-aaa-fixme.sh ++++ b/scripts/boot/9990-aaa-fixme.sh +@@ -40,7 +40,10 @@ else + udevinfo='udevinfo' + fi + ++old_root_overlay_label="live-rw" ++old_home_overlay_label="home-rw" + custom_overlay_label="persistence" ++old_custom_overlay_label="custom-ov" + persistence_list="persistence.conf" + old_persistence_list="live-persistence.conf" + +diff --git a/scripts/boot/9990-misc-helpers.sh b/scripts/boot/9990-misc-helpers.sh +index 5c5341c..addc82a 100755 +--- a/scripts/boot/9990-misc-helpers.sh ++++ b/scripts/boot/9990-misc-helpers.sh +@@ -1553,6 +1553,32 @@ activate_custom_mounts () + echo ${used_devices} + } + ++fix_backwards_compatibility () ++{ ++ local device dir opt backing include_list ++ device=${1} ++ dir=${2} ++ opt=${3} ++ ++ if [ -n "${PERSISTENCE_READONLY}" ] ++ then ++ return ++ fi ++ ++ backing="$(mount_persistence_media ${device})" ++ if [ -z "${backing}" ] ++ then ++ return ++ fi ++ ++ include_list="${backing}/${persistence_list}" ++ if [ ! -r "${include_list}" ] && [ ! -r "${backing}/${old_persistence_list}" ] ++ then ++ echo "# persistence backwards compatibility: ++${dir} ${opt},source=." > "${include_list}" ++ fi ++} ++ + is_mountpoint () + { + directory="$1" +diff --git a/scripts/boot/9990-overlay.sh b/scripts/boot/9990-overlay.sh +index c6de171..4a080bc 100755 +--- a/scripts/boot/9990-overlay.sh ++++ b/scripts/boot/9990-overlay.sh +@@ -210,7 +210,7 @@ setup_unionfs () + + if is_in_comma_sep_list overlay ${PERSISTENCE_METHOD} + then +- overlays="${custom_overlay_label}" ++ overlays="${old_root_overlay_label} ${old_home_overlay_label} ${custom_overlay_label} ${old_custom_overlay_label}" + fi + + local overlay_devices +@@ -222,10 +222,27 @@ setup_unionfs () + media="$(echo ${media} | tr ":" " ")" + + case ${media} in ++ ${old_root_overlay_label}=*) ++ device="${media#*=}" ++ fix_backwards_compatibility ${device} / union ++ overlay_devices="${overlay_devices} ${device}" ++ ;; ++ ++ ${old_home_overlay_label}=*) ++ device="${media#*=}" ++ fix_backwards_compatibility ${device} /home bind ++ overlay_devices="${overlay_devices} ${device}" ++ ;; ++ + ${custom_overlay_label}=*) + device="${media#*=}" + overlay_devices="${overlay_devices} ${device}" + ;; ++ ++ ${old_custom_overlay_label}=*) ++ device="${media#*=}" ++ overlay_devices="${overlay_devices} ${device}" ++ ;; + esac + done + fi diff --git a/debian/patches/series b/debian/patches/series index f471306..4ddef73 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -18,4 +18,4 @@ 39_persistence_with_forensic.patch 40_support_multiple_hooks.patch 41_drop_nameserver_from_ip_option.patch -42_restore_support_for_custom-ov_persistence.patch +42_restore_support_for_old_persistence.patch