Commit 33bfab1d authored by Leigh B Stoller's avatar Leigh B Stoller

Minor tweaks.

parent e686f45a
......@@ -18,13 +18,14 @@ sub usage()
" -i Info mode only\n";
exit(-1);
}
my $optlist = "di";
my $optlist = "dix:";
my $debug = 1;
my $infomode = 0;
my $VMPATH = "/var/emulab/vms/vminfo";
my $EXTRAFS = "/extrafs";
my $EXTRAFS = "/scratch";
my $VGNAME = "xen-vg";
my $role;
my $XMINFO;
#
# Turn off line buffering on output
......@@ -57,7 +58,13 @@ usage()
my $vnodeid = $ARGV[0];
$role = $ARGV[1] if (@ARGV == 2);
my $XMINFO = "$VMPATH/$vnodeid/xm.conf";
if (defined($options{"x"})) {
$XMINFO = $options{"x"};
}
else {
$XMINFO = "$VMPATH/$vnodeid/xm.conf";
}
CreateExtraFS();
system("mkdir $EXTRAFS/$role")
......@@ -172,8 +179,15 @@ foreach my $device (keys(%diskinfo)) {
# have a real MBR in them.
#
my $opts = "";
if (! ($device =~ /disk/)) {
$opts = "-b -f";
if (defined($options{"x"})) {
if ($device =~ /sda/) {
$opts = "-b";
}
}
else {
if (! ($device =~ /disk/)) {
$opts = "-b -f";
}
}
if ($infomode) {
system("imagezip -i $opts $device");
......@@ -181,6 +195,9 @@ foreach my $device (keys(%diskinfo)) {
else {
system("imagezip -o $opts $device $EXTRAFS/$filename");
}
if ($?) {
Fatal("imagezip failed");
}
}
#
......
......@@ -17,7 +17,7 @@ sub usage()
" -i Info mode only\n";
exit(-1);
}
my $optlist = "di";
my $optlist = "dix";
my $debug = 1;
my $infomode = 0;
my $VMPATH = "/var/xen/configs";
......@@ -113,8 +113,8 @@ foreach my $vif (@$ifacelist) {
push(@newifaces, "$mac, bridge=$iface");
}
# XXX Ick!
if ($vnodeid eq "boss") {
for (my $i = 1; $i < 4; $i++) {
if ($vnodeid eq "boss" && !defined($options{"x"})) {
for (my $i = 1; $i <= 4; $i++) {
my $iface = "xenbr$i";
my $mac = "00:00:99:98:97:0$i";
push(@newifaces, "mac=$mac, bridge=$iface");
......
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