Commit 74ccf410 authored by Mike Hibler's avatar Mike Hibler
Browse files

Ensure that /usr/ports is not a symlink.

parent 71b75eb1
......@@ -379,6 +379,15 @@ sub SetupFsNode()
}
print "Installing the fs metaport.\n";
# Make sure /usr/ports is not a symlink to RO shared space
if (-l "/usr/ports") {
if (!unlink("/usr/ports") {
print "WARNING: /usr/ports is a symlink, port install may fail\n";
} else {
mysystem("mkdir /usr/ports");
}
}
$ENV{"PKG_PATH"} = $emulabconfig{FS_PKG_DIR};
mysystem("pkg_add $emulabconfig{FS_PKG} >/tmp/perrs 2>&1");
......@@ -670,6 +679,16 @@ sub SetupOpsNode($)
SetupFatal("Could not get package info from Emulab!");
}
print "Installing the ops metaport.\n";
# Make sure /usr/ports is not a symlink to RO shared space
if (-l "/usr/ports") {
if (!unlink("/usr/ports") {
print "WARNING: /usr/ports is a symlink, port install may fail\n";
} else {
mysystem("mkdir /usr/ports");
}
}
$ENV{"PKG_PATH"} = $emulabconfig{OPS_PKG_DIR};
mysystem("pkg_add $emulabconfig{OPS_PKG} >/tmp/perrs 2>&1");
if ($WINSUPPORT) {
......@@ -992,6 +1011,16 @@ sub SetupBossNode()
SetupFatal("Could not get package info from Emulab!");
}
print "Installing the boss metaport.\n";
# Make sure /usr/ports is not a symlink to RO shared space
if (-l "/usr/ports") {
if (!unlink("/usr/ports") {
print "WARNING: /usr/ports is a symlink, port install may fail\n";
} else {
mysystem("mkdir /usr/ports");
}
}
$ENV{"PKG_PATH"} = $emulabconfig{BOSS_PKG_DIR};
mysystem("pkg_add -f -v $emulabconfig{BOSS_PKG} >/tmp/perrs 2>&1");
if ($WINSUPPORT) {
......
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