a0791d397ae7970682450cd7e1cf4d720cd6f4d4
[live-initramfs-grml.git] / debian / patches / 02_more_verbose_toram.diff
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 02_more_verbose_toram.dpatch by  <mika@grml.org>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Support more verbose version of toram via rsync
6
7 @DPATCH@
8
9 --- a/scripts/live      2008-08-16 10:42:18.000000000 +0200
10 +++ b/scripts/live      2008-08-16 10:47:10.000000000 +0200
11 @@ -632,11 +632,21 @@
12                 cd "${OLDPWD}"
13         else
14                 if [ -n "${MODULETORAMFILE}" ]
15 -               then
16 -                       cp ${MODULETORAMFILE} ${copyto} # copy only the filesystem module
17 -               else
18 -                       cp -a ${copyfrom}/* ${copyto}   # "cp -a" from busybox also copies hidden files
19 -               fi
20 +                   if [ -x /bin/rsync ] ; then
21 +                   echo " * Copying $MODULETORAMFILE to RAM" 1>/dev/console
22 +                      rsync -a --progress ${MODULETORAMFILE} ${copyto} 1>/dev/console # copy only the filesystem module
23 +                   else
24 +                      cp ${MODULETORAMFILE} ${copyto} # copy only the filesystem module
25 +                   fi
26 +                els
27 +                   if [ -x /bin/rsync ] ; then
28 +                   echo " * Copying medium to RAM" 1>/dev/console
29 +                      rsync -a --progress ${copyfrom}/* ${copyto} 1>/dev/console  # "cp -a" from busybox also copies hidden files
30 +                   else
31 +                      cp -a ${copyfrom}/* ${copyto}   # "cp -a" from busybox also copies hidden files
32 +                   fi
33 +                fi
34 +               
35  
36                 livefs_root
37                 umount ${copyfrom}