#56: CSV-config-parser doesn't return "0" or "false" but undef.
----------------------+-----------------------------------------------------
 Reporter:  sebi-m    |       Owner:     
     Type:  defect    |      Status:  new
 Priority:  major     |   Milestone:  4.9
Component:  bootdisk  |     Version:  4.8
 Keywords:            |  
----------------------+-----------------------------------------------------
 While enhancing the config.pl script (I'll open another report for this
 later), I realized that you give the value "0" or "false" to the install-
 script. This is due to a check whether true (equals not "0" or "false") or
 returning undef. I fixed the script, patch follows. This _should_ also
 apply to conf-mysql.pl, but I don't use this therefore I cannot validate
 this.


 Regards

 Sebi

 --- 8< --- 8< --- 8< ---

 Index: install/lib/conf-csv.pl
 ===================================================================
 --- install/lib/conf-csv.pl     (revision 3342)
 +++ install/lib/conf-csv.pl     (working copy)
 @@ -97,7 +97,8 @@
          unless defined $lookup && defined $property;
      (exists $config_hash->{$lookup}->{$property})
          or return undef;
 -    my $value = $config_hash->{$lookup}->{$property}
 +    my $value = $config_hash->{$lookup}->{$property};
 +    defined $value
          or return undef;
      $value =~ /\S/
          or return undef;

 --- 8< --- 8< --- 8< ---

 Index: install/lib/conf-mysql.pl
 ===================================================================
 --- install/lib/conf-mysql.pl   (revision 3342)
 +++ install/lib/conf-mysql.pl   (working copy)
 @@ -54,7 +54,8 @@
          or return undef;
      my $ref = $sth->fetchrow_hashref()
          or return undef;
 -    my $value = $ref->{'value'}
 +    my $value = $ref->{'value'};
 +    defined $value
          or return undef;
      $value =~ /\S/
          or return undef;

-- 
Ticket URL: <http://sourceforge.net/apps/trac/unattended/ticket/56>
Unattended <https://apps.sourceforge.net/trac/unattended/>
This is a system for fully automating the installation of Windows 2000 
Professional and Server, Windows XP, and Windows Server 2003.
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
unattended-devel mailing list
unattended-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unattended-devel

Reply via email to