Commit 00933f23 authored by Mike Hibler's avatar Mike Hibler

More Xen tweaks

parent e22a18cd
......@@ -74,6 +74,12 @@ if (defined($options{"j"})) {
if (@ARGV) {
usage();
}
# XXX not yet
if (INXENVM()) {
exit(0);
}
sub checkkernel($$);
$FBSD_VERSION = `uname -v`;
......
......@@ -47,6 +47,7 @@ sub REMOTE() { return libsetup::REMOTE(); }
sub REMOTEDED() { return libsetup::REMOTEDED(); }
sub MFS() { return libsetup::MFS(); }
sub JAILED() { return libsetup::JAILED(); }
sub INXENVM() { return libsetup::INXENVM(); }
#
# Various programs and things specific to FreeBSD and that we want to export.
......@@ -129,45 +130,47 @@ sub os_ifconfig_line($$$$$$$$;$$%)
#
# Need to check units on the speed. Just in case.
#
if ($speed =~ /(\d*)([A-Za-z]*)/) {
if ($2 eq "Mbps") {
$speed = $1;
}
elsif ($2 eq "Kbps") {
$speed = $1 / 1000;
}
else {
warn("*** Bad speed units $2 in ifconfig, default to 100Mbps\n");
$speed = 100;
}
if ($speed == 1000) {
$media = $IFC_1000MBS;
if (!INXENVM()) {
if ($speed =~ /(\d*)([A-Za-z]*)/) {
if ($2 eq "Mbps") {
$speed = $1;
}
elsif ($2 eq "Kbps") {
$speed = $1 / 1000;
}
else {
warn("*** Bad speed units $2 in ifconfig, default to 100Mbps\n");
$speed = 100;
}
if ($speed == 1000) {
$media = $IFC_1000MBS;
}
elsif ($speed == 100) {
$media = $IFC_100MBS;
}
elsif ($speed == 10) {
$media = $IFC_10MBS;
}
else {
warn("*** Bad Speed $speed in ifconfig, default to 100Mbps\n");
$speed = 100;
$media = $IFC_100MBS;
}
}
elsif ($speed == 100) {
$media = $IFC_100MBS;
if ($duplex eq "full") {
$mediaopt = $IFC_FDUPLEX;
}
elsif ($speed == 10) {
$media = $IFC_10MBS;
elsif ($duplex eq "half") {
$mediaopt = $IFC_HDUPLEX;
}
else {
warn("*** Bad Speed $speed in ifconfig, default to 100Mbps\n");
$speed = 100;
$media = $IFC_100MBS;
warn("*** Bad duplex $duplex in ifconfig, default to full\n");
$duplex = "full";
$mediaopt = $IFC_FDUPLEX;
}
}
if ($duplex eq "full") {
$mediaopt = $IFC_FDUPLEX;
}
elsif ($duplex eq "half") {
$mediaopt = $IFC_HDUPLEX;
}
else {
warn("*** Bad duplex $duplex in ifconfig, default to full\n");
$duplex = "full";
$mediaopt = $IFC_FDUPLEX;
}
$uplines = "";
if ($inet eq "") {
......
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