$text{'tables_emaster'}
\n"; &ui_print_footer("", $text{'index'}); exit; } elsif ($mode == 2) { print "
$text{'tables_eslave'}
\n"; &ui_print_footer("", $text{'index'}); exit; } @tables = &list_nis_tables(); @domains = &unique(map { $_->{'domain'} } @tables); $in{'table'} = int($in{'table'}); print "
\n"; if ($type eq 'hosts') { &show_nis_table([ $text{'hosts_ip'}, $text{'hosts_name'} ], $t, '\s+', [ 0, 1 ]); } elsif ($type eq 'networks') { &show_nis_table([ $text{'networks_name'}, $text{'networks_ip'} ], $t, '\s+', [ 0, 1 ]); } elsif ($type eq 'group' || $type eq 'group_shadow') { &show_nis_table([ $text{'group_name'}, $text{'group_gid'}, $text{'group_members'} ], $t, ':', [ 0, 2, 3 ], "width=100%"); } elsif ($type eq 'passwd_shadow' || $type eq 'passwd_shadow_full' || $type eq 'passwd') { &show_nis_table([ $text{'passwd_name'}, $text{'passwd_uid'}, $text{'passwd_real'}, $text{'passwd_home'}, $text{'passwd_shell'} ], $t, ':', [ 0, 2, 4, 5, 6 ], "width=100%"); } elsif ($type eq 'services') { &show_nis_table([ $text{'services_name'}, $text{'services_proto'}, $text{'services_port'} ], $t, '[\s/]+', [ 0, 2, 1 ]); } elsif ($type eq 'services2') { &show_nis_table([ $text{'services_name'}, $text{'services_proto'}, $text{'services_port'} ], $t, '[\s/]+', [ 0, 1, 2 ]); } elsif ($type eq 'protocols') { &show_nis_table([ $text{'protocols_name'}, $text{'protocols_number'}, $text{'protocols_aliases'} ], $t, '\s+', [ 0, 1, -2 ]); } elsif ($type eq 'netgroup') { &show_nis_table([ $text{'netgroup_name'}, $text{'netgroup_members'} ], $t, '\s+', [ 0, -1 ]); } elsif ($type eq 'ethers') { &show_nis_table([ $text{'ethers_mac'}, $text{'ethers_ip'} ], $t, '\s+', [ 0, 1 ]); } elsif ($type eq 'rpc') { &show_nis_table([ $text{'rpc_name'}, $text{'rpc_number'}, $text{'rpc_aliases'} ], $t, '\s+', [ 0, 1, -2 ]); } elsif ($type eq 'netmasks') { &show_nis_table([ $text{'netmasks_net'}, $text{'netmasks_mask'} ], $t, '\s+', [ 0, 1 ]); } elsif ($type eq 'aliases') { &show_nis_table([ $text{'aliases_from'}, $text{'aliases_to'} ], $t, '[\s:]+', [ 0, 1 ]); } else { # Allow editing of file directly print "
\n"; } print "", "$text{'tables_add'} \n"; print "", "$text{'tables_text'}
\n"; }