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