aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2006-11-01 21:14:35 +0000
committerintrigeri <intrigeri@boum.org>2006-11-01 21:14:35 +0000
commitb2cda6aae39c0f67999f4b8c9b4aee93c207287e (patch)
tree33fc549a0d99be31201442436dfce5849bc4498a /handlers
parent6b015afc1ed4d2be5e48e77eea1ca65cbcf69a1e (diff)
downloadbackupninja-b2cda6aae39c0f67999f4b8c9b4aee93c207287e.tar.gz
backupninja-b2cda6aae39c0f67999f4b8c9b4aee93c207287e.tar.bz2
sys: start to fix silly output display and data loss
Diffstat (limited to 'handlers')
-rwxr-xr-xhandlers/sys8
1 files changed, 5 insertions, 3 deletions
diff --git a/handlers/sys b/handlers/sys
index 677d5ee..7c31780 100755
--- a/handlers/sys
+++ b/handlers/sys
@@ -443,17 +443,19 @@ fi
# these files can be used to directly partition a disk of the same size.
if [ "$partitions" == "yes" ]; then
- devices=`$SFDISK -l | grep "^Disk /dev" | cut -d/ -f2,3 | cut -d: -f1`
+ devices=`$SFDISK -l 2>/dev/null | grep "^Disk /dev" | awk '{print $2}' | cut -d: -f1`
+ debug "$SFDISK will try to backup partition tables for devices $devices"
if [ "$devices" == "" ]; then
warning "No harddisks found"
fi
for dev in $devices; do
+ debug "$SFDISK will try to backup partition tables for device $dev"
[ -b $dev ] || continue
label=${dev#/dev/}
label=${label//\//-}
outputfile=${partitionsfile//__star__/$label}
- debug "$SFDISK $sfdisk_options -d /$dev > $outputfile"
- $SFDISK $sfdisk_options -d /$dev > $outputfile
+ debug "$SFDISK $sfdisk_options -d $dev > $outputfile"
+ $SFDISK $sfdisk_options -d $dev > $outputfile
done
fi