restore support for old persistence media
[live-boot-grml.git] / debian / patches / reverts / revert_toram_bootoption_to_expected_behaviour.patch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 19_revert_toram_bootoption_to_expected_behaviour.dpatch by Michael Prokop <mika@grml.org>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Revert toram bootoption to expected behaviour.
6 ## DP:
7 ## DP: In commit 36bb11382c81d5bce4b69f6d3d618dfd1c38dffb
8 ## DP: of live-initramfs-grml (when merging Debian's version 1.157.4-1)
9 ## DP: the behaviour of toram bootoption was modified, see
10 ## DP: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534878
11 ## DP:
12 ## DP: On Grml we want to have the option to load the whole medium
13 ## DP: into RAM to e.g. have additional directories like /deb,
14 ## DP: /scripts or whatever. This is possible using the toram bootoption
15 ## DP: without any additional arguments.
16 ## DP:
17 ## DP: If you do NOT want to load the whole medium to RAM just
18 ## DP: boot using toram=grml.squashfs (or whatever it's named,
19 ## DP: there's a ready-to-use bootoption in Grml's bootsplash
20 ## DP: menu available) instead.
21 ## DP:
22 ## DP: Ammusingly the requested behaviour is available in Debian's
23 ## DP: live-boot if rsync is not available, so this patch
24 ## DP: actually just unifies the code paths and reverts the
25 ## DP: behaviour change back to what the log message says.
26
27 @DPATCH@
28
29 index d79beed..1b6926e 100755
30 --- a/components/9990-toram-todisk.sh
31 +++ b/components/9990-toram-todisk.sh
32 @@ -86,8 +86,7 @@
33                                 echo " * Copying whole medium to RAM" 1>/dev/console
34                                 rsync -a --progress ${copyfrom}/* ${copyto} 1>/dev/console  # "cp -a" from busybox also copies hidden files
35                         else
36 -                               mkdir -p ${copyto}/${LIVE_MEDIA_PATH}
37 -                               cp -a ${copyfrom}/${LIVE_MEDIA_PATH}/* ${copyto}/${LIVE_MEDIA_PATH}
38 +                               cp -a ${copyfrom}/* ${copyto}/
39                                 if [ -e ${copyfrom}/${LIVE_MEDIA_PATH}/.disk ]
40                                 then
41                                         cp -a ${copyfrom}/${LIVE_MEDIA_PATH}/.disk ${copyto}