From 379ed95564b5b84caedd338a9a57adfbaa9f1c62 Mon Sep 17 00:00:00 2001 From: teastep Date: Tue, 26 Jun 2007 23:06:34 +0000 Subject: [PATCH] Prospective fix for Blahdeblah's /etc/protocols problem git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6685 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/buildports.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Shorewall-perl/buildports.pl b/Shorewall-perl/buildports.pl index 8cc3298f3..8d9609443 100755 --- a/Shorewall-perl/buildports.pl +++ b/Shorewall-perl/buildports.pl @@ -121,10 +121,14 @@ EOF open_file 'protocols' or fatal_error "Cannot open protocols: $!"; while ( read_a_line1 ) { - my ( $proto1, $number, $proto2, $proto3 ) = split_line( 2, 4, '/etc/protocols entry'); + my ( $proto1, $number, @aliases ) = split_line( 2, 10, '/etc/protocols entry'); print_it( $proto1, $number ); - print_it( $proto2, $number ) unless $proto2 eq '-' || $proto3 ne '-'; + + for my $alias ( @aliases ) { + last if $alias eq '-'; + print_it( $alias, $number ); + } } print "\t\t );\n\n";