1 From: Evgeni Golov <evgeni@debian.org>
2 Subject: restore support for old persistence media
4 diff --git a/scripts/boot/9990-aaa-fixme.sh b/scripts/boot/9990-aaa-fixme.sh
5 index 416d6b4..74517e8 100755
6 --- a/scripts/boot/9990-aaa-fixme.sh
7 +++ b/scripts/boot/9990-aaa-fixme.sh
8 @@ -40,7 +40,10 @@ else
12 +old_root_overlay_label="live-rw"
13 +old_home_overlay_label="home-rw"
14 custom_overlay_label="persistence"
15 +old_custom_overlay_label="custom-ov"
16 persistence_list="persistence.conf"
17 old_persistence_list="live-persistence.conf"
19 diff --git a/scripts/boot/9990-misc-helpers.sh b/scripts/boot/9990-misc-helpers.sh
20 index 5c5341c..addc82a 100755
21 --- a/scripts/boot/9990-misc-helpers.sh
22 +++ b/scripts/boot/9990-misc-helpers.sh
23 @@ -1553,6 +1553,32 @@ activate_custom_mounts ()
27 +fix_backwards_compatibility ()
29 + local device dir opt backing include_list
34 + if [ -n "${PERSISTENCE_READONLY}" ]
39 + backing="$(mount_persistence_media ${device})"
40 + if [ -z "${backing}" ]
45 + include_list="${backing}/${persistence_list}"
46 + if [ ! -r "${include_list}" ] && [ ! -r "${backing}/${old_persistence_list}" ]
48 + echo "# persistence backwards compatibility:
49 +${dir} ${opt},source=." > "${include_list}"
56 diff --git a/scripts/boot/9990-overlay.sh b/scripts/boot/9990-overlay.sh
57 index c6de171..4a080bc 100755
58 --- a/scripts/boot/9990-overlay.sh
59 +++ b/scripts/boot/9990-overlay.sh
60 @@ -210,7 +210,7 @@ setup_unionfs ()
62 if is_in_comma_sep_list overlay ${PERSISTENCE_METHOD}
64 - overlays="${custom_overlay_label}"
65 + overlays="${old_root_overlay_label} ${old_home_overlay_label} ${custom_overlay_label} ${old_custom_overlay_label}"
69 @@ -222,10 +222,27 @@ setup_unionfs ()
70 media="$(echo ${media} | tr ":" " ")"
73 + ${old_root_overlay_label}=*)
74 + device="${media#*=}"
75 + fix_backwards_compatibility ${device} / union
76 + overlay_devices="${overlay_devices} ${device}"
79 + ${old_home_overlay_label}=*)
80 + device="${media#*=}"
81 + fix_backwards_compatibility ${device} /home bind
82 + overlay_devices="${overlay_devices} ${device}"
85 ${custom_overlay_label}=*)
87 overlay_devices="${overlay_devices} ${device}"
90 + ${old_custom_overlay_label}=*)
91 + device="${media#*=}"
92 + overlay_devices="${overlay_devices} ${device}"