Commit b02490c5 authored by Mike Hibler's avatar Mike Hibler

Use the localize_mfs "-F" option to set the MFS kernel.

Also, default to FreeBSD 10.x when possible.
parent 1e2f58c2
......@@ -67,6 +67,7 @@ sub Install($$$)
Phase "mfs", "Setting up MFSs", sub {
my $localfile = "$TFTP_DIR/tftpboot.tar.gz";
my $kernelvers;
Phase "mfsfetch", "Fetching MFS tarball", sub {
DoneIfExists($localfile);
......@@ -102,19 +103,25 @@ sub Install($$$)
Phase "freemv", "Using freebsd${fv} version of admin MFS", sub {
DoneIfExists("$TFTP_DIR/freebsd");
ExecQuietFatal("cd $TFTP_DIR; $MV freebsd${fv} freebsd");
# use the FreeBSD 9.x kernel if available
if (-x "$TFTP_DIR/freebsd/boot/kernel9") {
ExecQuietFatal("cd $TFTP_DIR/freebsd/boot; ".
"cp -fp kernel9 kernel");
# find the best MFS kernel to use
if (!$kernelvers) {
if (-x "$TFTP_DIR/freebsd/boot/kernel10") {
$kernelvers = 10;
} elsif (-x "$TFTP_DIR/freebsd/boot/kernel9") {
$kernelvers = 9;
}
}
};
Phase "frismv", "Using frisbee${fv} version of disk load MFS", sub {
DoneIfExists("$TFTP_DIR/frisbee");
ExecQuietFatal("cd $TFTP_DIR; $MV frisbee${fv} frisbee");
# use the FreeBSD 9.x kernel if available
if (-x "$TFTP_DIR/frisbee/boot/kernel9") {
ExecQuietFatal("cd $TFTP_DIR/frisbee/boot; ".
"cp -fp kernel9 kernel");
# find the best MFS kernel to use
if (!$kernelvers) {
if (-x "$TFTP_DIR/frisbee/boot/kernel10") {
$kernelvers = 10;
} elsif (-x "$TFTP_DIR/frisbee/boot/kernel9") {
$kernelvers = 9;
}
}
};
#
......@@ -125,10 +132,13 @@ sub Install($$$)
DoneIfExists("$TFTP_DIR/freebsd.newnode");
ExecQuietFatal("cd $TFTP_DIR; ".
"$MV freebsd${fv}.newnode freebsd.newnode");
# use the FreeBSD 9.x kernel if available
if (-x "$TFTP_DIR/freebsd.newnode/boot/kernel9") {
ExecQuietFatal("cd $TFTP_DIR/freebsd.newnode/boot; ".
"cp -fp kernel9 kernel");
# find the best MFS kernel to use
if (!$kernelvers) {
if (-x "$TFTP_DIR/freebsd.newnode/boot/kernel10") {
$kernelvers = 10;
} elsif (-x "$TFTP_DIR/freebsd.newnode/boot/kernel9") {
$kernelvers = 9;
}
}
};
}
......@@ -187,6 +197,9 @@ sub Install($$$)
# This opt says to include igb cruft. Needed on G8s.
#
my $opt = ($PROTOGENI_GENIRACK ? "-i" : "");
if ($kernelvers) {
$opt += " -F $kernelvers";
}
Phase "localize", "Localizing the MFSes", sub {
foreach my $mfs ("frisbee", "freebsd", "freebsd.newnode") {
......
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