diff -Nur e-smith-base-5.6.0/root/etc/e-smith/events/actions/update-ifcfg e-smith-base-5.6.0_bz7200/root/etc/e-smith/events/actions/update-ifcfg --- e-smith-base-5.6.0/root/etc/e-smith/events/actions/update-ifcfg 2014-03-24 03:47:24.000000000 +0100 +++ e-smith-base-5.6.0_bz7200/root/etc/e-smith/events/actions/update-ifcfg 2015-06-11 22:12:27.443605697 +0200 @@ -5,9 +5,16 @@ use esmith::ethernet; use strict; +my $c = esmith::ConfigDB->open_ro() || + die "Couldn't open ConfigDB"; + my @adapters = split(/\n/, esmith::ethernet::probeAdapters()); my @nics = (); +if (($c->get('EthernetDriver1')->value || 'unknown') eq 'dummy'){ + push @adapters, "dummy\tdummy\t10:00:01:02:03:04\tFake Network Interface\tdummy0"; +} + # Expand templates for every adapters found foreach my $adapter (@adapters){ my (undef, undef, undef, undef, $nic) = split(/\t/, $adapter, 5); @@ -30,8 +37,6 @@ } # Build a list of interfaces for which we want to keep the config -my $c = esmith::ConfigDB->open_ro() || - die "Couldn't open ConfigDB"; foreach ($c->get_all_by_prop( type => 'interface')){ push @nics, $_->prop('Name'); } diff -Nur e-smith-base-5.6.0/root/etc/sysconfig/modules/dummy.modules e-smith-base-5.6.0_bz7200/root/etc/sysconfig/modules/dummy.modules --- e-smith-base-5.6.0/root/etc/sysconfig/modules/dummy.modules 1970-01-01 01:00:00.000000000 +0100 +++ e-smith-base-5.6.0_bz7200/root/etc/sysconfig/modules/dummy.modules 2015-06-11 21:46:25.972266957 +0200 @@ -0,0 +1,3 @@ +#!/bin/sh +/sbin/modprobe dummy +exec ip link set dummy0 address 10:00:01:02:03:04 diff -Nur e-smith-base-5.6.0/root/usr/share/perl5/vendor_perl/esmith/console/configure.pm e-smith-base-5.6.0_bz7200/root/usr/share/perl5/vendor_perl/esmith/console/configure.pm --- e-smith-base-5.6.0/root/usr/share/perl5/vendor_perl/esmith/console/configure.pm 2015-06-11 21:37:53.259394821 +0200 +++ e-smith-base-5.6.0_bz7200/root/usr/share/perl5/vendor_perl/esmith/console/configure.pm 2015-06-11 21:53:36.797092816 +0200 @@ -49,17 +49,17 @@ if (scalar @adapters == 1) { - if ($ifName eq "external") + if ($ifName eq "external" && $db->get_prop('InternalInterface', 'Name') ne 'dummy0') { # We'll use a VLAN on eth0 for the "dedicated" WAN link $db->set_value("EthernetDriver2", "unknown"); return 'CHANGE'; } - # Internal, and there's only one - my (undef, $driver, $hwaddr, undef, $device) = split (/\t/, $adapters[0], 5); - $db->set_value("EthernetDriver1", $driver); - $db->set_prop("InternalInterface", "Name", $device); - return 'CHANGE'; + else + { + # Add a dummy network interface, only valid for internal nic + push @adapters, "dummy\tdummy\t10:00:01:02:03:04\tFake Network Interface\tdummy0"; + } } my %tag2driver; @@ -105,6 +105,8 @@ $default ||= $tag; } } + # Remove the dummy adapter from the list, it can't be used as external device + pop @adapters if $adapters[1] =~ m/^dummy\tdummy/; #-------------------------------------------------------- # These are just to ensure that xgettext knows about the @@ -533,7 +535,7 @@ ETHERNET_EXTERNAL: #------------------------------------------------------------ { - if (scalar @adapters == 1) + if (scalar @adapters == 1 && $db->get_prop('InternalInterface', 'Name') ne 'dummy0') { ($rc, $choice) = $console->message_page (