Commit aa9a527f authored by Mike Hibler's avatar Mike Hibler

Quicky option to prepare (-N) to NOT unmount NFS filesystems.

Used by rc.mkelab since it assumes /share will be mounted after running prepare.
parent 8679bec6
......@@ -425,7 +425,7 @@ sub SetupFsNode()
# From this point on will need to log in as root,
#
print "Clearing out existing accounts and such\n";
mysystem("$BINDIR/prepare");
mysystem("$BINDIR/prepare -N");
#
# Remove the outer testbed startup script.
......@@ -741,7 +741,7 @@ sub SetupOpsNode($)
# From this point on will need to log in as root,
#
print "Clearing out existing accounts and such\n";
mysystem("$BINDIR/prepare");
mysystem("$BINDIR/prepare -N");
#
# Remove the outer testbed startup script.
......@@ -1106,7 +1106,7 @@ sub SetupBossNode()
# From this point on will need to log in as root,
#
print "Clearing out existing accounts and such\n";
mysystem("$BINDIR/prepare");
mysystem("$BINDIR/prepare -N");
#
# Remove the outer testbed startup script.
......
......@@ -5,6 +5,7 @@
# All rights reserved.
#
use English;
use Getopt::Std;
require 'ctime.pl';
# Drag in path stuff so we can find emulab stuff.
......@@ -53,6 +54,18 @@ $| = 1;
#
use libsetup;
#
# XXX Elabinelab hack: option to not unmount NFS filesystems.
# The setup script assumes that /share is mounted after this runs.
#
my $noumount = 0;
my %options = ();
if (getopts("N", \%options)) {
if (defined($options{"N"})) {
$noumount = 1;
}
}
#
# First clean up the node as it would be if free.
#
......@@ -74,7 +87,7 @@ foreach my $dbfile (@DBFILES) {
# This allows us to clean up /users and /proj. We only do the cleanup if
# if unmount succeeds and even then, we do it in a safe way.
#
if (-e "/share/freebsd") {
if (!$noumount && -e "/share/freebsd") {
print "Unmounting NFS filesystems ...\n";
# XXX "unmount -t nfs" does not seem to work
if (!system("umount -h fs")) {
......
......@@ -5,6 +5,7 @@
# All rights reserved.
#
use English;
use Getopt::Std;
require 'ctime.pl';
#
......@@ -53,6 +54,18 @@ $| = 1;
#
use libsetup;
#
# XXX Elabinelab hack: option to not unmount NFS filesystems.
# The setup script assumes that /share is mounted after this runs.
#
my $noumount = 0;
my %options = ();
if (getopts("N", \%options)) {
if (defined($options{"N"})) {
$noumount = 1;
}
}
#
# First clean up the node as it would be if free.
#
......@@ -74,7 +87,7 @@ foreach my $dbfile (@DBFILES) {
# This allows us to clean up /users and /proj. We only do the cleanup if
# if unmount succeeds and even then, we do it in a safe way.
#
if (-e "/share/freebsd") {
if (!$noumount && -e "/share/freebsd") {
print "Unmounting NFS filesystems ...\n";
if (!system("umount -t nfs")) {
#
......
Markdown is supported
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