On Debian systems, if the dns-nameservers option is defined in /etc/network/interfaces, it will be updated when changing nameservers.
---- Changes since 1.480 ----
Updated bonding support to use the new format in Debian 5.0, thanks to Caspar Smit.
+---- Changes since 1.500 ----
+Added a field for editing the MAC address to apply at boot time on Redhat-based systems.
print &ui_table_row($text{'vlan_id'},
$in{'new'} ? &ui_textbox("vlanid", $vlanid, 10)
: $vlanid.&ui_hidden("vlanid", $vlanid));
-}
+ }
+
+# Hardware address, if non-virtual
+if ((!$b && $in{'virtual'} eq "") ||
+ ($b && $b->{'virtual'} eq "" &&
+ defined(&boot_iface_hardware) &&
+ &boot_iface_hardware($b->{'name'}))) {
+ $hardfield = &ui_opt_textbox("ether", $b->{'ether'}, 18,
+ $text{'aifc_default'});
+ print &ui_table_row($text{'aifc_hard'}, $hardfield);
+ }
print &ui_table_end();
$b->{'broadcast'} = $conf{'BROADCAST'};
$b->{'gateway'} = $conf{'GATEWAY'};
$b->{'mtu'} = $conf{'MTU'};
+ $b->{'ether'} = $conf{'HWADDR'};
$b->{'dhcp'} = ($conf{'BOOTPROTO'} eq 'dhcp');
$b->{'bootp'} = ($conf{'BOOTPROTO'} eq 'bootp');
$b->{'edit'} = ($b->{'name'} !~ /^ppp|irlan/);
delete($conf{'GATEWAY'});
}
$conf{'MTU'} = $_[0]->{'mtu'};
+ $conf{'HWADDR'} = $_[0]->{'ether'};
$conf{'ONBOOT'} = $_[0]->{'up'} ? "yes" : "no";
$conf{'ONPARENT'} = $_[0]->{'up'} ? "yes" : "no"
if ($_[0]->{'virtual'} ne '');
{
}
+sub boot_iface_hardware
+{
+return $_[0] =~ /^eth/;
+}
+
1;
$b->{'mtu'} = $in{'mtu_def'} ? undef : $in{'mtu'};
}
+ # MAC address
+ if (defined($in{'ether'}) && !$in{'ether_def'}) {
+ $in{'ether'} =~ /^[A-Fa-f0-9:]+$/ ||
+ &error(&text('aifc_ehard', $in{'ether'}));
+ $b->{'ether'} = $in{'ether'};
+ }
+
if ($in{'new'} && !$access{'up'} ||
&can_edit("up", $b) && $in{'up'} && $access{'up'}) {
$b->{'up'}++;