X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=handlers%2Fsys;h=57d9d60859c37d2efba1052b2cbe7295d65b1e0b;hb=025aece21dacfb1b0731ab8a0d967fe7cec66e5d;hp=7c31780e77f78753b98ef63cfc4b2049380ca307;hpb=62cea42ef43dabe6a5ea4ab83ddb6e9d5116b64d;p=matthijs%2Fupstream%2Fbackupninja-vserver.git diff --git a/handlers/sys b/handlers/sys index 7c31780..57d9d60 100755 --- a/handlers/sys +++ b/handlers/sys @@ -444,7 +444,6 @@ fi if [ "$partitions" == "yes" ]; then 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 @@ -454,8 +453,11 @@ if [ "$partitions" == "yes" ]; then 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 2>/dev/null" + $SFDISK $sfdisk_options -d $dev > $outputfile 2>/dev/null + if [ $? -ne 0 ]; then + warning "The partition table for $dev could not be saved." + fi done fi