Revert toram bootoption to expected behaviour.
authorMichael Prokop <mika@grml.org>
Fri, 26 Jun 2015 12:52:05 +0000 (14:52 +0200)
committerEvgeni Golov <evgeni@grml.org>
Fri, 21 Aug 2015 14:44:47 +0000 (16:44 +0200)
In commit 36bb11382c81d5bce4b69f6d3d618dfd1c38dffb
of live-initramfs-grml (when merging Debian's version 1.157.4-1)
the behaviour of toram bootoption was modified, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534878

On Grml we want to have the option to load the whole medium
into RAM to e.g. have additional directories like /deb,
/scripts or whatever. This is possible using the toram bootoption
without any additional arguments.

If you do NOT want to load the whole medium to RAM just
boot using toram=grml.squashfs (or whatever it's named,
there's a ready-to-use bootoption in Grml's bootsplash
menu available) instead.

Ammusingly the requested behaviour is available in Debian's
live-boot if rsync is not available, so this patch
actually just unifies the code paths and reverts the
behaviour change back to what the log message says.

components/9990-toram-todisk.sh

index e7938e0..5b76d54 100755 (executable)
@@ -86,8 +86,7 @@ copy_live_to ()
                                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}