Commit f32313ce authored by Mike Hibler's avatar Mike Hibler

Elabinelab fixes.

Need to enable/disable the SelfLoader based on the version of perl installed.
Other minor nits.
parent c3008371
...@@ -52,6 +52,8 @@ ELVIN_COMPAT=changeme ...@@ -52,6 +52,8 @@ ELVIN_COMPAT=changeme
# The name of the outer boss for inner boss to request services from. # The name of the outer boss for inner boss to request services from.
OUTERBOSS_NODENAME=changeme OUTERBOSS_NODENAME=changeme
TBCOOKIESUFFIX=changeme TBCOOKIESUFFIX=changeme
# XXX hack to work around perl bug
SELFLOADER_DATA=changeme
# #
# SSL Certificate stuff. Used to customize config files in ssl directory. # SSL Certificate stuff. Used to customize config files in ssl directory.
# Note that OrganizationalUnit is set in the cnf file. # Note that OrganizationalUnit is set in the cnf file.
......
...@@ -311,7 +311,7 @@ sub doboot() ...@@ -311,7 +311,7 @@ sub doboot()
# #
# FreeBSD version specific adjustments for defaults. # FreeBSD version specific adjustments for defaults.
# #
if ($FBSD_VERSION == 7.2) { if ($FBSD_VERSION >= 7.2) {
$emulabconfig{"MFSVERSION"} = "72"; $emulabconfig{"MFSVERSION"} = "72";
} else { } else {
$emulabconfig{"MFSVERSION"} = "62"; $emulabconfig{"MFSVERSION"} = "62";
...@@ -2099,6 +2099,19 @@ sub CreateDefsFile($) ...@@ -2099,6 +2099,19 @@ sub CreateDefsFile($)
last SWITCH; last SWITCH;
}; };
/^SELFLOADER_DATA$/ && do {
#
# XXX we know that the emulab-*-3.x package sets include
# perl 5.10 which has a bug with taint checking which in
# turn is triggered by the SelfLoader we use. So turn
# it off when perl 5.10 is used. Otherwise don't set
# the variable at all so it will default correctly.
#
if ($emulabconfig{BOSS_PKG} =~ /^emulab-boss-3/) {
print OUTDEFS "SELFLOADER_DATA=""\n";
}
last SWITCH;
};
print OUTDEFS $line; print OUTDEFS $line;
} }
} }
...@@ -2305,6 +2318,7 @@ sub GetEmulabSource($) ...@@ -2305,6 +2318,7 @@ sub GetEmulabSource($)
mysystem("rsync -a --delete /usr/src/ $destdir/testbed"); mysystem("rsync -a --delete /usr/src/ $destdir/testbed");
} }
else { else {
print "Downloading current testbed software from ${bossname}\n";
# #
# Get the tarball from the server. # Get the tarball from the server.
# #
...@@ -2359,12 +2373,12 @@ sub RecreateDir($$) ...@@ -2359,12 +2373,12 @@ sub RecreateDir($$)
# If it is a mount point, unmount it. Otherwise, rename it. # If it is a mount point, unmount it. Otherwise, rename it.
# #
if (-d "$dir") { if (-d "$dir") {
if (system("umount $dir") == 0) { if (system("umount $dir >/dev/null 2>&1") == 0) {
# was a mounted FS, need to remove it from fstab if present # was a mounted FS, need to remove it from fstab if present
mysystem("sed -i '.orig' -E '\\;\[\[:space:\]\]$TBDIR\[\[:space:\]\];d' /etc/fstab"); mysystem("sed -i '.orig' -E '\\;\[\[:space:\]\]$TBDIR\[\[:space:\]\];d' /etc/fstab");
} }
# remove it if it is empty # remove it if it is empty
rmdir("$dir"); rmdir("$dir >/dev/null 2>&1");
} }
# #
......
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