* Only add a VDE NIC if there is a webserver.

svn path=/nixos/trunk/; revision=25986
This commit is contained in:
Eelco Dolstra 2011-02-16 10:07:28 +00:00
parent 49213aa80a
commit 32aa967ee1
2 changed files with 3 additions and 2 deletions

View File

@ -20,7 +20,7 @@ sub new {
my $name = $args->{name}; my $name = $args->{name};
if (!$name) { if (!$name) {
$startCommand =~ /run-(.*)-vm$/; $startCommand =~ /run-(.*)-vm$/ if defined $startCommand;
$name = $1 || "machine"; $name = $1 || "machine";
} }

View File

@ -93,7 +93,8 @@ let
'' ''
createDisk("harddisk", 4 * 1024); createDisk("harddisk", 4 * 1024);
my $machine = createMachine({ hda => "harddisk", cdrom => glob("${iso}/iso/*.iso"), qemuFlags => '${qemuNICFlags 1 1 1}' }); my $machine = createMachine({ hda => "harddisk", cdrom => glob("${iso}/iso/*.iso"),
qemuFlags => '${if testChannel then qemuNICFlags 1 1 1 else ""}'});
$machine->start; $machine->start;
${optionalString testChannel '' ${optionalString testChannel ''