From 1d19a5d8d6740cf5a7bb1cea5c3d349f20e13169 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 11 Feb 2009 17:05:09 +0000 Subject: fix passing &>/dev/null to dd command (it is not interpreted by shell if in string) --- rescue/restore-image.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'rescue') diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index ad4797944..3c3d6f5e8 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -250,12 +250,13 @@ function write_image() *) uncomp=cat ;; esac + skipstart=/bin/true if [ -n "$win32_part_dev" ]; then - skipstart='dd of=/dev/null bs=1 count=32256 &>/dev/null;' + skipstart='dd of=/dev/null bs=1 count=32256' fi # the actual dumping command, from image to disk - ${uncomp} ${images_dir}/${image} | (${skipstart} dd bs=4M of=/dev/${root} >/tmp/backup.out 2>&1>>/tmp/log) & + ${uncomp} ${images_dir}/${image} | (${skipstart} &>/dev/null; dd bs=4M of=/dev/${root} >/tmp/backup.out 2>&1>>/tmp/log) & sleep 3 pid=$(ps ax | grep 'dd bs=4M of' | grep -v grep | awk '{ print $1 }') -- cgit v1.2.1