BBConfig repeated fields in templates

Robbio <[email protected]> Thu, 25 Nov 2004 13:34:03 +0100
Newsgroups gmane.network.bb4.devel
Message-ID <[email protected]>
--EeQfGwPcQSOJBaQU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

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

Would generate just first line in bb-dftab.=20

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

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 =3D~ /_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 =3D~ /_add$/ ) {
!       push @{ $record->{$attr} }, @{ $template->{$attr} } ;
      }
    }

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


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

--EeQfGwPcQSOJBaQU
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBpdE7chhPjLQvSZ0RAoj3AJ993pBtpsmzWux61hVvC9HSNdAqYACgkPkZ
AvsbhRh9HvbHwkM4XWakak4=
=ai2B
-----END PGP SIGNATURE-----

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