initial commit of file from CVS for smeserver-bridge-interface on Sat Sep 7 20:11:17 AEST 2024
This commit is contained in:
@@ -0,0 +1 @@
|
||||
br0
|
1
root/etc/e-smith/db/configuration/defaults/bridge/status
Normal file
1
root/etc/e-smith/db/configuration/defaults/bridge/status
Normal file
@@ -0,0 +1 @@
|
||||
enabled
|
@@ -0,0 +1 @@
|
||||
tap0
|
1
root/etc/e-smith/db/configuration/defaults/bridge/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/bridge/type
Normal file
@@ -0,0 +1 @@
|
||||
service
|
21
root/etc/e-smith/db/configuration/migrate/50bridge-interface
Normal file
21
root/etc/e-smith/db/configuration/migrate/50bridge-interface
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
my $bridge = $DB->get('bridge') || $DB->new_record('bridge', {type => 'service'});
|
||||
my $brStatus = $bridge->prop('status') || 'enabled';
|
||||
|
||||
# Return nothing if bridge is disabled
|
||||
return "" if ($brStatus eq 'disabled');
|
||||
|
||||
my $br = $bridge->prop('bridgeInterface') || 'br0';
|
||||
my $IntIfConf = $DB->get('InternalInterface');
|
||||
my $IntIfName = $IntIfConf->prop('Name');
|
||||
|
||||
# If the InternalInterface Name is the same as the bridge, there's nothing to do
|
||||
return "" if ($IntIfName eq $br);
|
||||
|
||||
# else, we store the old InternalInterface Name in ethernetInterface
|
||||
# and we set the InternalInterface to be the bridge
|
||||
|
||||
$bridge->set_prop('ethernetInterface',$IntIfName);
|
||||
$IntIfConf->set_prop('Name',$br);
|
||||
}
|
||||
|
Reference in New Issue
Block a user