Commit cc34a49a authored by Mike Hibler's avatar Mike Hibler
Browse files

Don't run rc.nfshack unless the NFS server has the race condition.

parent 675e5459
#!/usr/bin/perl -w
#
# Copyright (c) 2004, 2005 University of Utah and the Flux Group.
# Copyright (c) 2004-2014 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -116,9 +116,26 @@ sub doboot()
# XXX enable the NFS client-side EACCES hack
if (-x "$RCDIR/rc.nfshack") {
print("Enabling client-side NFS EACCES hack\n");
system("$RCDIR/rc.nfshack");
# This is allowed to fail; the hack might not be supported.
#
# Only do this if the server has the race.
# XXX this info is part of the mount call which normally hasn't
# happened yet, so make the call here.
#
my $fstype = "NFS-RACY";
my @tmccresults;
if (tmcc(TMCCCMD_MOUNTS, undef, \@tmccresults) >= 0) {
foreach my $str (@tmccresults) {
if ($str =~ /^FSTYPE=([-\w]+)/) {
$fstype = $1;
last;
}
}
}
if ($fstype eq "NFS-RACY") {
print("Enabling client-side NFS EACCES hack\n");
system("$RCDIR/rc.nfshack");
# This is allowed to fail; the hack might not be supported.
}
}
# Now we get into the real work.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment