1a71e4684ecf79e45fca04a76505e8f9d38b20b6
[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      Sat Aug 16 11:01:24 2008 +0200
10 +++ b/scripts/live      Sat Aug 16 11:02:47 2008 +0200
11 @@ -633,10 +633,21 @@
12         else
13                 if [ -n "${MODULETORAMFILE}" ]
14                 then
15 -                       cp ${MODULETORAMFILE} ${copyto} # copy only the filesystem module
16 -               else
17 -                       cp -a ${copyfrom}/* ${copyto}   # "cp -a" from busybox also copies hidden files
18 -               fi
19 +                   if [ -x /bin/rsync ] ; then
20 +                   echo " * Copying $MODULETORAMFILE to RAM" 1>/dev/console
21 +                      rsync -a --progress ${MODULETORAMFILE} ${copyto} 1>/dev/console # copy only the filesystem module
22 +                   else
23 +                      cp ${MODULETORAMFILE} ${copyto} # copy only the filesystem module
24 +                   fi
25 +                else
26 +                   if [ -x /bin/rsync ] ; then
27 +                   echo " * Copying medium to RAM" 1>/dev/console
28 +                      rsync -a --progress ${copyfrom}/* ${copyto} 1>/dev/console  # "cp -a" from busybox also copies hidden files
29 +                   else
30 +                      cp -a ${copyfrom}/* ${copyto}   # "cp -a" from busybox also copies hidden files
31 +                   fi
32 +                fi
33 +               
34  
35                 livefs_root
36                 umount ${copyfrom}