Changeset 1877 for branches/2.2.5


Ignore:
Timestamp:
Jan 24, 2008, 9:54:07 AM (12 years ago)
Author:
bruno
Message:

improved dmidecode error handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi/mindi-bkphw

    r1844 r1877  
    1919my $confdir = "$ARGV[1]";
    2020
     21die "You need dmidecode for Hardware support\n" if (! -x "/usr/sbin/dmidecode");
     22
    2123mkdir $bkpdir,0755 if (! -d $bkpdir) ;
    22 open(SYSTEM,"/usr/sbin/dmidecode -s 'system-product-name' |") || die "You need /usr/sbin/dmidecode for mindi hardware support";
     24open(SYSTEM,"/usr/sbin/dmidecode -s 'system-product-name' 2> /dev/null |") || die "You need /usr/sbin/dmidecode for mindi hardware support";
    2325my $productname = <SYSTEM>;
    2426close(SYSTEM);
Note: See TracChangeset for help on using the changeset viewer.