fixed legacy persistence handling
authorlukas227 <lukas-gh@schwaighofer.name>
Wed, 15 Aug 2012 07:31:59 +0000 (09:31 +0200)
committerEvgeni Golov <evgeni@grml.org>
Wed, 15 Aug 2012 07:31:59 +0000 (09:31 +0200)
* the mount_persistence_media () function must return the mount point of
  the partition to the caller, even if it was already mounted
  (${backing} = ${old_backing})
* Fix the appropriate check that erroneously prevented the use of the
  (unquoted) dot

debian/patches/37_fix_legacy_persistence_handling.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/37_fix_legacy_persistence_handling.patch b/debian/patches/37_fix_legacy_persistence_handling.patch
new file mode 100644 (file)
index 0000000..3ba7e78
--- /dev/null
@@ -0,0 +1,33 @@
+commit 7eaab98d69d8bdbc46cceaeac64007b214593174
+Author: lukas227 <lukas-gh@schwaighofer.name>
+Date:   Mon Aug 13 22:35:27 2012 +0200
+
+    fixed legacy persistence handling
+    
+    * the mount_persistence_media () function must return the mount point of
+      the partition to the caller, even if it was already mounted
+      (${backing} = ${old_backing})
+    * Fix the appropriate check that erroneously prevented the use of the
+      (unquoted) dot
+
+diff --git a/scripts/live-helpers b/scripts/live-helpers
+index b90637a..7d5c675 100644
+--- a/scripts/live-helpers
++++ b/scripts/live-helpers
+@@ -778,6 +778,7 @@ mount_persistence_media ()
+                       return 1
+               fi
+       fi
++      echo ${backing}
+       return 0
+ }
+@@ -1334,7 +1335,7 @@ get_custom_mounts ()
+                       local source="${dir}"
+                       if [ -n "${opt_source}" ]
+                       then
+-                              if echo ${opt_source} | grep -q -e "^/" -e "^\(.*/\)\?\.\.\?\(/.*\)\?$" && [ "${source}" != "." ]
++                              if echo ${opt_source} | grep -q -e "^/" -e "^\(.*/\)\?\.\.\?\(/.*\)\?$" && [ "${opt_source}" != "." ]
+                               then
+                                       log_warning_msg "Skipping unsafe custom mount with option source=${opt_source}: must be either \".\" (the media root) or a relative path w.r.t. the media root that contains neither comas, nor the special \".\" and \"..\" path components"
+                                       continue
index 040ab5c..8704fa9 100644 (file)
@@ -17,3 +17,4 @@
 34_ignore_unknown_filesystems.patch
 35_fix_findiso_umount.patch
 36_support_dhcp_bootoption.patch
+37_fix_legacy_persistence_handling.patch