Commit 2b46ad88 authored by Mike Hibler's avatar Mike Hibler

Add a NODECONSOLE defs* variable.

This is not as general or as useful as you might think.
Right now it simply controls what device gets used as console when
customizing the MFSes. "sio" is the default. Other choices correspond
to pxeboot variants: sio2, vga, null. Choosing vga also sets the magic
VGAONLY setting in the frisbee MFS ensuring that any customized (via slicefix)
FreeBSD image doesn't try to use the serial port as console.

A real solution for choosing node consoles would not be per-testbed.
It would be per-node-type and per-node. Right now the console type is
selected in that fashion via a combination of the pxe_boot_path and
frisbee/admin MFS OSIDs. At some point we should make the console setting
explicit.
parent 44569ae7
......@@ -732,6 +732,7 @@ FS_WITH_QUOTAS
TRACK_INTERSWITCH_BANDWIDTH
TIMESTAMPS
OURTIMEZONE
NODECONSOLE
UNIFIED_BOSS_AND_OPS
DISABLE_NSE
DISABLE_NAMED_SETUP
......@@ -4976,6 +4977,7 @@ done
#
......@@ -5082,6 +5084,7 @@ NEEDMROUTED=0
OPSVM_ENABLE=0
OPSVM_MOUNTPOINT="/ops"
OURTIMEZONE="America/Denver"
NODECONSOLE="sio"
PORTAL_ENABLE=0
PORTAL_ISPRIMARY=0
......
......@@ -130,6 +130,7 @@ AC_SUBST(FS_WITH_QUOTAS)
AC_SUBST(TRACK_INTERSWITCH_BANDWIDTH)
AC_SUBST(TIMESTAMPS)
AC_SUBST(OURTIMEZONE)
AC_SUBST(NODECONSOLE)
AC_SUBST(UNIFIED_BOSS_AND_OPS)
AC_SUBST(DISABLE_NSE)
AC_SUBST(DISABLE_NAMED_SETUP)
......@@ -343,6 +344,7 @@ NEEDMROUTED=0
OPSVM_ENABLE=0
OPSVM_MOUNTPOINT="/ops"
OURTIMEZONE="America/Denver"
NODECONSOLE="sio"
PORTAL_ENABLE=0
PORTAL_ISPRIMARY=0
......
......@@ -238,6 +238,18 @@ NOSHAREDFS=0
#
NFSRACY=1
#
# Set the type of the console on nodes. This is used when customizing
# the MFSes at Emulab setup time and for customizing the image loaded
# on a node at experiment setup time.
#
# "sio" use the "com1" serial port
# "sio2" use the "com2" serial port
# "vga" use the VGA device
# "null" don't use a console
#
NODECONSOLE="sio"
#
# Set this if you are running:
# - Perl 5.8
......
......@@ -137,6 +137,7 @@ $PUBLIC_NETMASK = "@PUBLIC_NETMASK@";
$LOGFACIL = '@TBLOGFACIL@';
$QUOTA_FSLIST = '@FS_WITH_QUOTAS@';
$OURTIMEZONE = "@OURTIMEZONE@";
$NODECONSOLE = "@NODECONSOLE@";
$LOGDIR = "$TBROOT/log";
$ETCDIR = "$PREFIX/etc";
......
......@@ -8,7 +8,7 @@ use installvars;
my $MFSTARBALL = "tftpboot-elabinelab.tar.gz";
my $MFSURL = "http://www.emulab.net/downloads/$MFSTARBALL";
my $MFSVERSION = "62";
my $MFSCONSOLE = "sio";
my $MFSCONSOLE = $NODECONSOLE;
my $MFSDESCRIPTORS = "$TOP_SRCDIR/install/descriptors-mfs.xml";
my $ZONEINFO = "/usr/share/zoneinfo";
......@@ -84,6 +84,23 @@ sub Install($$$)
MungeMfsRoot("freebsd");
MungeMfsRoot("freebsd.newnode");
#
# Fix the console device in the MFSes
#
Phase "mfsconsole", "Setting the console for MFSes", sub {
my %consmap = (
"sio" => "com",
"sio2" => "com",
"vga" => "vid",
"null" => "null"
);
my $consdev = $consmap{$cons} . "console";
foreach my $mfs ("frisbee", "freebsd", "freebsd.newnode") {
AppendToFileFatal("$TFTP_DIR/$mfs/boot/loader.conf.orig",
"console=\"$consdev\"");
}
};
#
# Finally, create the compressed versions of the MFS files
#
......@@ -154,6 +171,18 @@ sub MungeMfsRoot($)
$status = 1;
}
#
# XXX tmp hack.
# If console is VGA, create the magic file that tells slicefix
# to ensure that serial console is disabled in any FreeBSD image
# that is loaded (in case the machine has no serial port).
# We should have a more general way to set the console on a per
# node basis.
#
if ($MFSCONSOLE eq "vga") {
ExecQuietFatal("cp /dev/null /mnt/etc/emulab/isvgaonly");
}
done:
ExecQuietFatal("umount /mnt");
if ($FBSD_MAJOR >= 5) {
......@@ -174,9 +203,3 @@ sub MungeMfsRoot($)
# Local Variables:
# mode:perl
# End:
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