3ba7e78950c3dffb02f9e478c26be6647162bc1f
[live-boot-grml.git] / debian / patches / 37_fix_legacy_persistence_handling.patch
1 commit 7eaab98d69d8bdbc46cceaeac64007b214593174
2 Author: lukas227 <lukas-gh@schwaighofer.name>
3 Date:   Mon Aug 13 22:35:27 2012 +0200
4
5     fixed legacy persistence handling
6     
7     * the mount_persistence_media () function must return the mount point of
8       the partition to the caller, even if it was already mounted
9       (${backing} = ${old_backing})
10     * Fix the appropriate check that erroneously prevented the use of the
11       (unquoted) dot
12
13 diff --git a/scripts/live-helpers b/scripts/live-helpers
14 index b90637a..7d5c675 100644
15 --- a/scripts/live-helpers
16 +++ b/scripts/live-helpers
17 @@ -778,6 +778,7 @@ mount_persistence_media ()
18                         return 1
19                 fi
20         fi
21 +       echo ${backing}
22         return 0
23  }
24  
25 @@ -1334,7 +1335,7 @@ get_custom_mounts ()
26                         local source="${dir}"
27                         if [ -n "${opt_source}" ]
28                         then
29 -                               if echo ${opt_source} | grep -q -e "^/" -e "^\(.*/\)\?\.\.\?\(/.*\)\?$" && [ "${source}" != "." ]
30 +                               if echo ${opt_source} | grep -q -e "^/" -e "^\(.*/\)\?\.\.\?\(/.*\)\?$" && [ "${opt_source}" != "." ]
31                                 then
32                                         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"
33                                         continue