Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Add default, not exported data0 for every host missing a data0 entry
Browse files Browse the repository at this point in the history
  • Loading branch information
mariux committed Jun 5, 2012
1 parent 42b6e12 commit 61ae4cc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions mxmount
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,28 @@ foreach(@lines) {

#print Dumper \%D;

add_data0_if_not_present();

mount_all();
create_exports();

system(exportfs -ra);

sub add_data0_if_not_present {
my $allmp = $D{$hostname};

foreach my $mp (sort { $a->{mountpoint} <=> $b->{mountpoint} } @$allmp ) {
if ($mp->{label} eq "data0") {
return;
}
}

# print "no data0 found\n";
parse_data("$hostname !data0");
# print Dumper $D{$hostname};
}


sub create_exports {
my $allmp = $D{$hostname};
my @CMD;
Expand Down

0 comments on commit 61ae4cc

Please sign in to comment.