Commit 447eab94 authored by Leigh B Stoller's avatar Leigh B Stoller

More little bug fixes.

parent 1c9274b3
#!/usr/bin/perl -wT #!/usr/bin/perl -wT
# #
# Copyright (c) 2000-2011 University of Utah and the Flux Group. # Copyright (c) 2000-2014 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -246,23 +246,26 @@ if (TBSiteVarExists("images/frisbee/maxrate_usr")) { ...@@ -246,23 +246,26 @@ if (TBSiteVarExists("images/frisbee/maxrate_usr")) {
# #
if (1) { if (1) {
# first find the OSIDs for the "standard" MFSes # first find the OSIDs for the "standard" MFSes
my $qr = DBQueryFatal("select osname,osid from os_info where osname in ". my $qr = DBQueryFatal("select osname,osid,version from os_info ".
" where osname in ".
" ('FREEBSD-MFS','FRISBEE-MFS','NEWNODE-MFS') ". " ('FREEBSD-MFS','FRISBEE-MFS','NEWNODE-MFS') ".
" and pid='$TBOPSPID'"); " and pid='$TBOPSPID'");
my ($amfs,$dmfs,$nmfs,$nmfspath); my ($amfs,$dmfs,$nmfs,$nmfspath,$nmfsvers);
while (my ($name, $osid) = $qr->fetchrow_array()) { while (my ($name, $osid, $version) = $qr->fetchrow_array()) {
if ($name eq "FREEBSD-MFS") { if ($name eq "FREEBSD-MFS") {
$amfs = $osid; $amfs = $osid;
} elsif ($name eq "FRISBEE-MFS") { } elsif ($name eq "FRISBEE-MFS") {
$dmfs = $osid; $dmfs = $osid;
} else { } else {
$nmfs = $osid; $nmfs = $osid;
$nmfsvers = $version;
$nmfspath = "/tftpboot/freebsd.newnode"; # XXX hardwired $nmfspath = "/tftpboot/freebsd.newnode"; # XXX hardwired
} }
} }
# make sure newnode MFS points to the correct place # make sure newnode MFS points to the correct place
DBQueryFatal("update os_info set path='$nmfspath' where osid=$nmfs"); DBQueryFatal("update os_info_versions set path='$nmfspath' ".
"where osid=$nmfs and vers=$nmfsvers");
# collect up non-standard PXE boot paths, first from node_type_attributes.. # collect up non-standard PXE boot paths, first from node_type_attributes..
my @bogoboots = (); my @bogoboots = ();
......
...@@ -153,7 +153,7 @@ class Image ...@@ -153,7 +153,7 @@ class Image
$query_result = $query_result =
DBQueryWarn("select imageid,version from image_versions ". DBQueryWarn("select imageid,version from image_versions ".
"where uuid='$safe_uuid' and ". "where uuid='$safe_uuid' and ".
" v.deleted is null"); " deleted is null");
} }
if (mysql_num_rows($query_result) == 0) { if (mysql_num_rows($query_result) == 0) {
return null; return null;
......
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