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

In the admin MFS, attempt to automatically enable the avoid-permission-denied

errors NFS hack under FreeBSD.
parent 06ce613d
......@@ -191,6 +191,7 @@ script-install: dir-install $(SCRIPTS)
$(INSTALL) -m 755 $(SRCDIR)/rc.ipod $(BINDIR)/rc/rc.ipod
$(INSTALL) -m 755 $(SRCDIR)/rc.kname $(BINDIR)/rc/rc.kname
$(INSTALL) -m 755 $(SRCDIR)/rc.mfs $(BINDIR)/rc/rc.mfs
$(INSTALL) -m 755 $(SRCDIR)/rc.nfshack $(BINDIR)/rc/rc.nfshack
$(INSTALL) -m 755 ./sethostname $(BINDIR)/sethostname
$(INSTALL) -m 755 $(SRCDIR)/dhclient $(BINDIR)/dhclient
$(INSTALL) -m 755 $(SRCDIR)/nodetype $(BINDIR)/nodetype
......
......@@ -97,6 +97,13 @@ sub doboot()
# This is allowed to fail; ipod might not be supported.
}
# 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.
}
# Now we get into the real work.
print("Checking Testbed reservation status\n");
my ($pid, $eid, $vname) = bootsetup();
......
#/bin/sh -
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005 University of Utah and the Flux Group.
# All rights reserved.
#
#
# Enable our gross hack to avoid transient NFS "permission denied" errors
# due to a BSD NFS server changing its exports list.
#
if [ -r /etc/emulab/paths.sh ]; then
. /etc/emulab/paths.sh
else
BINDIR=/etc/testbed
fi
enabled=`sysctl -n vfs.nfs.eacces_retry_enable 2>/dev/null`
if [ "$enabled"x = x ]; then
echo "WARNING: NFS client-side hack not supported, beware of \"permission denied\" failures"
exit 1
fi
if [ $enabled -eq 0 ]; then
sysctl vfs.nfs.eacces_retry_enable=1 >/dev/null 2>&1
# sysctl always returns 0 status?
enabled=`sysctl -n vfs.nfs.eacces_retry_enable 2>/dev/null`
if [ "$enabled"x = x -o $enabled -eq 0 ]; then
echo "WARNING: NFS client-side hack not enabled, beware of \"permission denied\" failures"
exit 1
fi
fi
echo "NFS client-side hack enabled"
exit 0
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