Commit 7655b031 authored by Mike Hibler's avatar Mike Hibler

Get the disktype from the DB rather than hardwire to ad0

parent 95ab4d98
......@@ -2,7 +2,7 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -56,7 +56,8 @@ delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
my $nodereboot = "$TB/bin/node_reboot";
my $createimage = "/usr/local/bin/create-image";
my $osselect = "$TB/bin/os_select";
my $device = "/dev/rad0";
my $devtype = "ad";
my $devnum = 0;
my $mereuser = 0;
my %imageid_row = ();
my $debug = 0;
......@@ -191,6 +192,18 @@ open(FILE, "> $filename") or
close(FILE) or
fatal("Could not truncate $filename: $!");
#
# Get the disktype for this node
#
$db_result =
DBQueryFatal("select disktype from nodes ".
"left join node_types on nodes.type=node_types.type ".
"where node_id='$node'");
if ($db_result->numrows == 1) {
($devtype) = $db_result->fetchrow_array;
}
my $device = "/dev/${devtype}${devnum}";
#
# Record when this image was updated, so that we can figure out which
# revision of the testbed image it was based off.
......
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