\n";
print " | $text{'ifcs_name'} | \n";
if ($in{'new'} && $in{'virtual'}) {
print "\n";
print "$in{'virtual'}:\n";
}
elsif ($in{'new'}) {
print "\n";
}
else {
print "$b->{'fullname'}\n";
}
print " | \n";
print "$text{'ifcs_ip'} | \n";
$virtual = (!$b && $in{'virtual'}) || ($b && $b->{'virtual'} ne "");
$dhcp = &can_edit("dhcp") && !$virtual;
$bootp = &can_edit("bootp") && !$virtual;
if ($dhcp) {
printf " %s\n",
$b && $b->{'dhcp'} ? "checked" : "", $text{'ifcs_dhcp'};
}
if ($bootp) {
printf " %s\n",
$b && $b->{'bootp'} ? "checked" : "", $text{'ifcs_bootp'};
}
if ($dhcp || $bootp) {
printf " %s\n",
!$b || (!$b->{'bootp'} && !$b->{'dhcp'}) ? "checked" : "",
$text{'ifcs_static'};
}
else {
print "\n";
}
printf " | \n",
$b && !$b->{'bootp'} && !$b->{'dhcp'} ? $b->{'address'} : "";
print " | $text{'ifcs_mask'} | \n";
if ($in{'virtual'} && $in{'new'} && $virtual_netmask) {
# Virtual netmask cannot be edited
print "$virtual_netmask | \n";
}
elsif (&can_edit("netmask", $b) && $access{'netmask'}) {
printf " | \n",
$b ? $b->{'netmask'} : $config{'def_netmask'};
}
else {
printf "%s | \n", $b ? $b->{'netmask'} : $text{'ifcs_auto'};
}
print "$text{'ifcs_broad'} | \n";
if (&can_edit("broadcast", $b) && $access{'broadcast'}) {
printf " | \n",
$b ? $b->{'broadcast'} : $config{'def_broadcast'};
}
else {
printf "%s | \n", $b ? $b->{'broadcast'}
: $text{'ifcs_auto'};
}
print " | $text{'ifcs_mtu'} | \n";
if (&can_edit("mtu", $b) && $access{'mtu'}) {
printf " | \n",
$b ? $b->{'mtu'} : $config{'def_mtu'};
}
else {
printf "%s | \n", $b && $b->{'mtu'} ? $b->{'mtu'}
: $text{'ifcs_auto'};
}
print "$text{'ifcs_act'} | \n";
if (&can_edit("up", $b) && $access{'up'}) {
printf " $text{'yes'}\n",
!$b || $b->{'up'} ? "checked" : "";
printf " $text{'no'} | \n",
$b && !$b->{'up'} ? "checked" : "";
}
else {
printf "%s | \n",
!$b ? $text{'yes'} :
$b->{'up'} ? $text{'yes'} : $text{'no'};
}
print " | \n";
if ($b && $b->{'virtual'} eq "") {
print "$text{'ifcs_virts'} | \n";
$vcount = 0;
foreach $vb (@boot) {
if ($vb->{'virtual'} ne "" && $vb->{'name'} eq $b->{'name'}) {
$vcount++;
}
}
print "$vcount\n";
if ($access{'virt'} && !$noos_support_add_virtifcs) {
print "(",
"$text{'ifcs_addvirt'})\n";
}
print " | \n";
}
print " \n";
print " |