Changeset 1857 in MondoRescue
- Timestamp:
- Jan 11, 2008, 3:28:40 PM (17 years ago)
- Location:
- branches/2.2.5/mindi
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mindi/aux-tools/sbin/calc-disk-size
r911 r1857 6 6 CalcDiskSize() { 7 7 local res cylinders sectorsize disksize i curr stub out 8 res=`parted2fdisk -l $1 2> 8 res=`parted2fdisk -l $1 2>/dev/null | grep -i "cylinders of"` 9 9 cylinders=`echo "$res" | cut -d' ' -f5` 10 10 sectorsize=`echo "$res" | cut -d' ' -f7` 11 cylindermod=`parted2fdisk -l $1 2> 11 cylindermod=`parted2fdisk -l $1 2>/dev/null | grep -i $1:`; # note colon at end to make sure it's not the /dev/sda# partition info 12 12 cylnum=`echo "$cylindermod" | cut -d' ' -f7` 13 13 predisksize=$(($cylinders*$sectorsize/1024)) -
branches/2.2.5/mindi/mindi
r1854 r1857 1745 1745 echo "Transforming $USBDEVICE in a Bootable device" >> $LOGFILE 1746 1746 echo "Checking $USBDEVICE" >> $LOGFILE 1747 $FDISK -l $USBDEVICE 2> &1>> $LOGFILE1747 $FDISK -l $USBDEVICE 2>> $LOGFILE 1>> $LOGFILE 1748 1748 if [ $? -ne 0 ]; then 1749 1749 echo "Unable to access $USBDEVICE" | tee -a $LOGFILE -
branches/2.2.5/mindi/parted2fdisk.pl
r1837 r1857 277 277 if ($args =~ /^-/) { 278 278 # -l or -s 279 open (FDISK, "$fdisk $fargs |") || die "Unable to read from $fdisk";279 open (FDISK, "$fdisk $fargs 2>/dev/null |") || die "Unable to read from $fdisk"; 280 280 while (<FDISK>) { 281 281 print; … … 284 284 } else { 285 285 # Modification mode 286 open (FDISK, "| $fdisk $fargs ") || die "Unable to modify through $fdisk";286 open (FDISK, "| $fdisk $fargs 2>/dev/null") || die "Unable to modify through $fdisk"; 287 287 while (<STDIN>) { 288 288 print FDISK; … … 444 444 my $foo; 445 445 446 open (FDISK, "$fdisk -l $device |") || die "Unable to read from $fdisk";446 open (FDISK, "$fdisk -l $device 2>/dev/null |") || die "Unable to read from $fdisk"; 447 447 while (<FDISK>) { 448 448 if ($_ =~ /heads/) { … … 468 468 my $foo; 469 469 470 open (FDISK, "$fdisk -l $device |") || die "Unable to read from $fdisk";470 open (FDISK, "$fdisk -l $device 2>/dev/null |") || die "Unable to read from $fdisk"; 471 471 while (<FDISK>) { 472 472 print if (($_ !~ /^\/dev\//) and (not (defined $wpart)) and ($verbose == 1)); … … 606 606 my $type = ""; 607 607 608 open (FDISK, "$fdisk -l $device |") || die "Unable to read from $fdisk";608 open (FDISK, "$fdisk -l $device 2>/dev/null |") || die "Unable to read from $fdisk"; 609 609 while (<FDISK>) { 610 610 if ($_ =~ /EFI GPT/) {
Note:
See TracChangeset
for help on using the changeset viewer.