RE: BBConfig repeated fields in templates

"Hale, Barbara S - CNF" <[email protected]> Thu, 25 Nov 2004 10:17:59 -0800
Newsgroups gmane.network.bb4.devel
Message-ID <3DD6D733ACDA8345BF4D443FECEC13B0020E55F7@cnfqe130.cnf.prod.cnf.com>
I believe that the correct format for doing multiples would be:

disk_add:	/:98:99

Barbara

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Robbio
Sent: Thursday, November 25, 2004 4:34 AM
To: [email protected]
Cc: [email protected]
Subject: {bbd} BBConfig repeated fields in templates

Hi,

I had a problem repeating specific fields within a template, i.e.
bb-config:
objectclass:    template
...
disk:           /:98:99
disk:           /usr:98:99
...

Would generate just first line in bb-dftab. 

See below for a patch to bbconfigure that solves this problem. 

BTW: i was using BBConfig-1_9 on AIX 5.1 using perl 5.6.0

Greetings,
Rob

***************
*** 374,386 ****

      #warn Data::Dumper->Dump([$attr],["attr"]) if $DEBUG;

!     map { if (not defined $record->{$attr} ) {
!             push @{ $record->{$attr} }, $_ ;
!           } elsif ( $attr =~ /_add$/ ) {
!             push @{ $record->{$attr} }, $_ ;
            }
-         } @{ $template->{$attr} } ;
-
    }

    return $record ;
--- 374,382 ----

      #warn Data::Dumper->Dump([$attr],["attr"]) if $DEBUG;

!     if ( not defined $record->{$attr} or $attr =~ /_add$/ ) {
!       push @{ $record->{$attr} }, @{ $template->{$attr} } ;
      }
    }

    return $record ;
***************


-- 
Get my gpg key: gpg --keyserver pgp.dtype.org --recv-keys B42F499D

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list send e-mail to mailto:[email protected]
with unsubscribe bbd in the BODY of the message.