1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 19_revert_toram_bootoption_to_expected_behaviour.dpatch by Michael Prokop <mika@grml.org>
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Revert toram bootoption to expected behaviour.
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
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.
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.
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.
29 index d79beed..1b6926e 100755
30 Index: live-boot-grml/scripts/live
31 ===================================================================
32 --- live-boot-grml.orig/scripts/live 2011-12-06 22:10:34.000000000 +0100
33 +++ live-boot-grml/scripts/live 2011-12-06 22:10:34.000000000 +0100
36 if [ -z "${MODULETORAM}" ]
38 - size=$(fs_size "" ${copyfrom}/${LIVE_MEDIA_PATH} "used")
39 + size=$(fs_size "" ${copyfrom}/ "used")
41 MODULETORAMFILE="${copyfrom}/${LIVE_MEDIA_PATH}/${MODULETORAM}"
44 echo " * Copying whole medium to RAM" 1>/dev/console
45 rsync -a --progress ${copyfrom}/* ${copyto} 1>/dev/console # "cp -a" from busybox also copies hidden files
47 - mkdir -p ${copyto}/${LIVE_MEDIA_PATH}
48 - cp -a ${copyfrom}/${LIVE_MEDIA_PATH}/* ${copyto}/${LIVE_MEDIA_PATH}
49 + cp -a ${copyfrom}/* ${copyto}/
50 if [ -e ${copyfrom}/${LIVE_MEDIA_PATH}/.disk ]
52 cp -a ${copyfrom}/${LIVE_MEDIA_PATH}/.disk ${copyto}