Skip to content

Commit

Permalink
remove NIS netgroup handling
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwutz committed Jun 13, 2016
1 parent 147b4ca commit 6fa0510
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions mxstartup2mxconfig
Original file line number Diff line number Diff line change
Expand Up @@ -248,28 +248,6 @@ sub print_ips_cfg {

##############################################################################

sub walknetgroup {
my @ng;

&y(\@ng,@_);

sub y {
my ($ary,$m)=@_;
$_=`ypmatch $m netgroup 2>/dev/null`;
foreach ( split ) {
if (/\(/) {
s/[\(\),]//g;
push @$ary, $_;
} else {
foreach ( split ) {
&y($ary,$_);
}
}
}
}

return @ng;
}


sub expand_hosts {
Expand All @@ -278,9 +256,7 @@ sub expand_hosts {


foreach my $host (@oh) {
if($host =~ /^\@(\S+)/) {
push @hosts, walknetgroup($1);
} elsif($host =~ /^(\/\S+)/) {
if ($host =~ /^(\/\S+)/) {
next unless(-r $1);
push @hosts, expand_hosts(read_file($1));
} else {
Expand Down

0 comments on commit 6fa0510

Please sign in to comment.