summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakconnect
blob: bb504b962ba27468b969b51a03dd0f364274d200 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
#!/usr/bin/perl

# DrakConnect

# Copyright (C) 1999-2002 MandrakeSoft (damien@mandrakesoft.com)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

use strict;
use diagnostics;
use lib qw(/usr/lib/libDrakX);

use standalone;     #- warning, standalone must be loaded very first, for 'explanations'

use interactive;
use common;
use network::netconnect;
use network::ethernet;
use network::tools;
use network::modem;
use network;
use c;
use modules;
use network::isdn;
use network::adsl;
use MDK::Common::Globals "network", qw($in $prefix $disconnect_file $connect_prog $connect_file);

my $xpm_path = "/usr/share/libDrakX/pixmaps";
local $_ = join '', @ARGV;

my ($netcnx, $netc, $intf)  = ({}, {}, {});
my @conx_type = ('modem', 'isdn_internal', 'isdn_external', 'adsl', 'cable', 'lan');

my $in = 'interactive'->vnew('su');
!$::isEmbedded and $in->isa('interactive::gtk');
$::Wizard_pix_up = "wiz_drakconnect.png";
$::Wizard_title = "Network & Internet Configuration";

my $activate_profile = 0; #- deactivated by default (in order to keep code)

MDK::Common::Globals::init(
	      in => $in,
	      prefix => '',
	      connect_file => "/etc/sysconfig/network-scripts/net_cnx_up",
	      disconnect_file => "/etc/sysconfig/network-scripts/net_cnx_down",
	      connect_prog => "/etc/sysconfig/network-scripts/net_cnx_pg"
	     );

$::isEmbedded && ref($in) =~ /gtk/ or goto dd;

require ugtk2;
ugtk2->import(qw(:helpers :wrappers :create));
my $expert_mode = 0;
network::netconnect::read_net_conf('', $netcnx, $netc);
modules::load_category('net');
my @all_cards = network::ethernet::conf_network_card_backend($netc, $intf);
network::netconnect::load_conf($netcnx, $netc, $intf);
network::network::probe_netcnx_type('', $netc, $intf, $netcnx);

my $window1 = ugtk2->new('drakconnect');
$window1->{rwindow}->signal_connect(delete_event => sub { ugtk2->exit(0) });
unless ($::isEmbedded) {
    $window1->{rwindow}->set_position('center');
    $window1->{rwindow}->set_title(N("Network configuration (%d adapters)", @all_cards));
    $window1->{rwindow}->set_size_request(500, 400);
}
$window1->{rwindow}->set_border_width(10);

my $combo1 = new Gtk2::OptionMenu;
$combo1->set_popdown_strings(network::netconnect::get_profiles());
my $old_profile = $netcnx->{PROFILE};
$combo1->entry->set_text($netcnx->{PROFILE} || "default");
my $button_del = new Gtk2::Button(N("Del profile..."));
$button_del->signal_connect(clicked => sub {
				my $dialog = _create_dialog(N("Delete profile"));
				$dialog->vbox->pack_start(new Gtk2::Label(N("Profile to delete:")),1,1,0);
				my $combo_dialog = new Gtk2::Option_menu;
				$combo_dialog->set_popdown_strings(grep { ! /default/ } network::netconnect::get_profiles());
				$dialog->vbox->pack_start($combo_dialog,1,1,0);
				my $bbox_dialog = new Gtk2::HButtonBox;
				$dialog->action_area->add($bbox_dialog);
				$bbox_dialog->set_layout('end');
				my $button_ok = Gtk2::Button->new_from_stock('gtk-ok');
				$button_ok->signal_connect(clicked => sub {
							       network::netconnect::del_profile($netcnx, $combo_dialog->entry->get_text);
							       $netcnx->{PROFILE} eq $combo_dialog->entry->get_text and $netcnx->{PROFILE} = "default";
							       Gtk2->main_quit;
							   });
				$bbox_dialog->add($button_ok);
				my $button_cancel = Gtk2::Button->new_from_stock('gtk-cancel');
				$button_cancel->signal_connect(clicked => sub { Gtk2->main_quit });
				$bbox_dialog->add($button_cancel);
				$dialog->show_all;
				$dialog->run;
				$dialog->destroy;
				$combo1->entry->set_text(-e "/etc/sysconfig/network-scripts/drakconnect_conf." . $combo1->entry->get_text ? $combo1->entry->get_text : "default");
				$combo1->set_popdown_strings(network::netconnect::get_profiles());
				apply();
			    });
$button_del->set_sensitive(network::netconnect::get_profiles() > 1);
my $button_new = new Gtk2::Button(N("New profile..."));
$button_new->signal_connect(clicked => sub {
				my $dialog = _create_dialog("New profile...");
				$dialog->vbox->pack_start(new Gtk2::Label(N("Name of the profile to create (the new profile is created as a copy of the current one) :")),1,1,0);
				my $entry_dialog = new Gtk2::Entry;
				$dialog->vbox->pack_start($entry_dialog,1,1,0);
				my $bbox_dialog = new Gtk2::HButtonBox;
				$dialog->action_area->add($bbox_dialog);
				$bbox_dialog->set_layout('end');
				my $button_ok = Gtk2::Button->new_from_stock('gtk-ok');
				$button_ok->signal_connect(clicked => sub {
							       network::netconnect::add_profile($netcnx, $entry_dialog->get_text);
							       $netcnx->{PROFILE} = $entry_dialog->get_text;
							       Gtk2->main_quit;
							   });
				$bbox_dialog->add($button_ok);
				my $button_cancel = Gtk2::Button->new_from_stock('gtk-cancel');
				$button_cancel->signal_connect(clicked => sub { Gtk2->main_quit });
				$bbox_dialog->add($button_cancel);
				$dialog->show_all;
				$dialog->run;
				$dialog->destroy;
				$combo1->entry->set_text(-e "/etc/sysconfig/network-scripts/drakconnect_conf." . $netcnx->{PROFILE} ? $netcnx->{PROFILE} : "default");
				$combo1->set_popdown_strings(network::netconnect::get_profiles());
			    });

my $hostname = chomp_(`hostname`);
my $type_label = new Gtk2::Label($netcnx->{type});
my $int_label = new Gtk2::Label($netcnx->{type} eq 'lan' ? N("Gateway:") : N("Interface:"));
my $interface_name = new Gtk2::Label($netcnx->{type} eq 'lan' ? $netc->{GATEWAY} : $netcnx->{NET_INTERFACE});
my $isconnected = -1;
my $warning_label1 = new Gtk2::Label("");
my $int_connect = new Gtk2::Button(N("Wait please"));
$int_connect->set_sensitive(0);
$int_connect->signal_connect(clicked => sub {
    if (!$isconnected) {
        if (cat_($connect_prog) =~ m|/usr/bin/kppp| && -e '/usr/bin/kppp') {
            run_program::rooted($prefix, "/usr/bin/kppp &");
          } else {
              connect_backend();
          } 
    } else {
        disconnect_backend();
    }
    update2();
});

my $button_internet = gtksignal_connect(Gtk2::Button->new(N("Configure Internet Access...")),
                                clicked => sub { configure_net('', $netcnx, $netc, $intf) });

my $tree_model = Gtk2::TreeStore->new("Gtk2::Gdk::Pixbuf", map { "Glib::String" } 2..6);
my $list = Gtk2::TreeView->new_with_model($tree_model);
$list->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererPixbuf->new, 'pixbuf' => 0));
each_index {
    $list->append_column(my $col = Gtk2::TreeViewColumn->new_with_attributes($_, Gtk2::CellRendererText->new, 'text' => $::i + 1));
    $col->set_sort_column_id($::i);
} (N("Interface"), N("IP address"), N("Protocol"), N("Driver"), N("State"));

build_list();

my $button_lan = gtksignal_connect(Gtk2::Button->new(N("Configure Local Area Network...")),
                                clicked => sub { configure_lan('', $netcnx, $netc, $intf) });

my ($bbox0, $label_host, $int_state, $button_expert);

$window1->{window}->add(
                        gtkpack_(Gtk2::VBox->new(0,10),
				 if_($activate_profile,
				     0, gtkpack_(Gtk2::HBox->new(0,0),
						 0, new Gtk2::Label(N("Profile: ")),
						 0, $combo1,
						 0, $button_del,
						 0, $button_new,
						),
				 ),
                                 0, gtkpack_(Gtk2::HBox->new(0,0),
                                             0, new Gtk2::Label(N("Hostname: ")),
                                             0, $label_host = new Gtk2::Label($hostname),
                                             ),
                                 0, gtkadd(Gtk2::Frame->new(N("Internet access")),
                                           gtkpack_(gtkset_border_width(Gtk2::VBox->new(0,0), 5),
                                                    1, gtkset_border_width(create_packtable({ col_spacings => 5, row_spacings => 5 },
                                                                                            [ new Gtk2::Label(N("Type:")), $type_label ],
                                                                                            [ $int_label, $interface_name ],
                                                                                            [ Gtk2::Label->new(N("Status:")), 
                                                                                              $int_state = Gtk2::Label->new(N("Testing your connection...")) ]
                                                                                            ),
                                                                           5),
                                                    0, $warning_label1,
                                                    0, gtkpack(Gtk2::HButtonBox->new,
                                                               $button_internet,
                                                               $int_connect,
                                                              ),
                                                    )
                                           ),
                                 1, gtkadd(Gtk2::Frame->new(N("LAN configuration")),
                                           gtkpack_(gtkset_border_width(Gtk2::VBox->new(0,0), 5),
                                                    0, $list,
                                                    0, new Gtk2::HBox(0,0),
                                                    0, gtkpack_(new Gtk2::HBox(0, 0),
                                                                0, $button_lan),
                                                    )
                                           ),
                                 0, gtkadd(Gtk2::HButtonBox->new,
                                           $button_expert = gtksignal_connect(new Gtk2::CheckButton(N("Expert Mode")),
                                                                              clicked => sub {
                                                                                  $expert_mode = $button_expert->get_active;
                                                                                  $_->set_sensitive($expert_mode) foreach $button_internet, $button_lan;
                                                                              }),
                                           gtksignal_connect(Gtk2::Button->new(N("Launch the wizard")),
                                                             clicked => sub {
                                                                 system("drakconnect&");
								 #- reload everything...
								 $netcnx = {}; $netc = {}; $intf = {};
								 network::netconnect::read_net_conf('', $netcnx, $netc);
								 modules::load_category('net');
								 @all_cards = network::ethernet::conf_network_card_backend($netc, $intf);
								 network::netconnect::load_conf($netcnx, $netc, $intf);
								 network::network::probe_netcnx_type('', $netc, $intf, $netcnx);
                                                                 $combo1->entry->set_text(-e "/etc/sysconfig/network-scripts/drakconnect_conf." . ($combo1->entry->get_text || "default"));
                                                                 update();
                                                             }),
                                           ),
                                 0, Gtk2::HSeparator->new,
                                 0, $bbox0 = new Gtk2::HButtonBox,
                                 ),
                        );


$button_expert->set_active($expert_mode);
my $button_apply = new Gtk2::Button(N("Apply"));
$button_apply->signal_connect(clicked => \&apply);
$button_apply->set_sensitive(0);
$bbox0->add($button_apply);

my $button_cancel = Gtk2::Button->new_from_stock('gtk-cancel');
$button_cancel->signal_connect(clicked => \&quit_global);
$bbox0->add($button_cancel);
my $button_ok = Gtk2::Button->new_from_stock('gtk-ok');
$button_ok->signal_connect(clicked => sub {
				 my $dialog = _create_dialog(N("Please wait"));
				 $dialog->vbox->pack_start(new Gtk2::Label(N("Please Wait... Applying the configuration")),1,1,20);
				 $dialog->show_all;
				 gtkflush();
				 apply();
				 $dialog->destroy;
				 update();
				 quit_global();
			     });
$bbox0->add($button_ok);

$combo1->signal_connect(realize => sub {
                            $combo1->entry->signal_connect(changed => sub {
                                                               #connected() and disconnect_backend();
                                                               network::netconnect::set_profile($netcnx, $combo1->entry->get_text);
                                                               network::netconnect::load_conf($netcnx, $netc, $intf);
                                                               $netcnx->{$_} = $netc->{$_} foreach qw(NET_DEVICE NET_INTERFACE);
                                                               update();
                                                               $button_apply->set_sensitive(1);
                                                           });
});

$window1->{rwindow}->show_all;
$_->set_sensitive(0) foreach $button_internet, $button_lan;
gtkflush();
my $tag = Glib::Timeout->add(4000, \&update2);
$window1->main;
ugtk2->exit(0);

dd:
$::isWizard = 1;
network::netconnect::main('', $netcnx, $in);
$in->exit(0);

sub build_list() {
    foreach my $i (0..$#all_cards) {
	my ($ip, $state);
	if (-x "/sbin/ifconfig") {
	    local $_ = `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig "eth$i"`;
	    $ip = /inet addr:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/o ? $1 : N("Bad Ip");
	    $_ = `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig`;
	    $state = /eth$i/ ? "up" : "down";
	} else {
            $ip = $intf->{"eth$i"}{IPADDR};
            $state = "n/a";
        }
        $tree_model->append_set(undef, [ map_index { $::i => $_ } (gtkcreate_pixbuf("eth_card_mini2.png"), "eth$i", $ip , $intf->{"eth$i"}{BOOTPROTO}, $all_cards[$i][1], $state) ]);
    }
}

sub apply() {
    $old_profile = $netcnx->{PROFILE} || "default";
    network::netconnect::save_conf($netcnx);

    $netcnx->{type} eq 'modem' and network::modem::ppp_configure($in, $netcnx->{$netcnx->{type}});
    $netcnx->{type} eq 'isdn_internal' and network::isdn::isdn_write_config_backend($netcnx->{$netcnx->{type}}, $netc, $netcnx); #$light
    $netcnx->{type} eq 'isdn_external' and network::modem::ppp_configure($in, $netcnx->{$netcnx->{type}});
    my $a = $netcnx->{type};
    $a =~ s/adsl_//;
    $netcnx->{type} =~ /adsl/ and network::adsl::adsl_conf_backend($netcnx->{$netcnx->{type}}, $netc, $a, $netcnx);

    $netcnx->{dhcp_client} and $netc->{dhcp_client} = $netcnx->{dhcp_client};
    network::configureNetwork2($in, $prefix, $netc, $intf);
    $netcnx->{type} =~ /adsl/ or system("/sbin/chkconfig --del adsl 2> /dev/null");
    $netcnx->{type} !~ /adsl_p/ and system("$prefix/etc/rc.d/init.d/network restart");
    $button_apply->set_sensitive(0);
}

sub ethisup { `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig` =~ /eth$_[0]/ }

my $to_update;
sub update() {
    my $h = chomp_(`hostname`);
    $label_host->set_label($h);
    $type_label->set($netcnx->{type});
    $int_label->set($netcnx->{type} eq 'lan' ? N("Gateway:") : N("Interface:"));
    $interface_name->set($netcnx->{type} eq 'lan' ? $netc->{GATEWAY} : $netcnx->{NET_INTERFACE});
    $tree_model->clear;
    build_list();
    $button_del->set_sensitive(network::netconnect::get_profiles() > 1);
    return 1 if $isconnected == -1;
    $int_state->set($isconnected ? N("Connected") : N("Not connected"));
    $int_connect->child->set($isconnected ? N("Disconnect...") : N("Connect..."));
    $int_connect->set_sensitive(1);
    1;
}

sub in_ifconfig {
    my ($intf) = @_;
    -e '/sbin/ifconfig' or return 1;
    $intf eq '' and return 1;
    `/sbin/ifconfig` =~ /$intf/;
}

sub update2() {
    undef $to_update;
    connected_bg(\$to_update);
    if (defined $to_update) {
        $isconnected = $to_update;
        if ($isconnected != -1) {
            if ($isconnected && !in_ifconfig($netcnx->{NET_INTERFACE})) {
                $warning_label1->set(N("Warning, another Internet connection has been detected, maybe using your network"));
                $isconnected = 0;
            } else { $warning_label1->set("") }
            $int_state->set($isconnected ? N("Connected") : N("Not connected"));
            $int_connect->child->set($isconnected ? N("Disconnect...") : N("Connect..."));
            $int_connect->set_sensitive(1);
        }
    }
    update();
    1;
}

sub quit_global() {
    ugtk2->exit(0);
}

sub configure_lan {
    my ($prefix, $netcnx, undef, $intf) = @_;
    my $window = _create_dialog(N("LAN configuration"));
    my @card_tab;

    if (@all_cards < 1) {
	$window->vbox->pack_start(new Gtk2::Label(N("You don't have any configured interface.
Configure them first by clicking on 'Configure'")),1,1,0);
	$window->action_area->add(gtkadd(gtkset_layout(Gtk2::HButtonBox->new, 'end'),
                                         gtksignal_connect(Gtk2::Button->new_from_stock('gtk-ok'),
                                                           clicked => sub { Gtk2->main_quit })
                                         )
                                  );
	$window->show_all;
	$window->run;
	$window->destroy;
	return;
    }

    $window->set_border_width(10);
    
    $window->vbox->pack_start(my $vbox0 = new Gtk2::VBox(0,0),
                              1, 1, 0,
                             );
    $vbox0->pack_start(new Gtk2::Label(N("LAN Configuration")),0,1,0);
    my $notebook = new Gtk2::Notebook;
    $vbox0->pack_start($notebook,0,1,0);
    foreach (0..$#all_cards) {
	my @infos;
	my @conf_data;
	$card_tab[2*$_] = \@infos;
	$card_tab[2*$_+1] = \@conf_data;
	my $vbox_local = new Gtk2::VBox(0,0);
	$vbox_local->set_border_width(10);
	$vbox_local->pack_start(new Gtk2::Label(N("Adapter %s: %s", $_+1 , "eth$_")),1,1,0);
	#	Eth${_}Hostname = $netc->{HOSTNAME}
	#       Eth${_}HostAlias = " . do { $netc->{HOSTNAME} =~ /([^\.]*)\./; $1 } . "
	#	Eth${_}Driver = $all_cards[$_]->[1]
        @conf_data = ([N("IP address"), \$intf->{"eth$_"}{IPADDR}],
			 [N("Netmask"), \$intf->{"eth$_"}{NETMASK}],
			 [N("Boot Protocol"), \$intf->{"eth$_"}{BOOTPROTO}, ["static", "dhcp", "bootp"]],
			 [N("Started on boot"), \$intf->{"eth$_"}{ONBOOT} , ["yes", "no"]],
			 [N("DHCP client"), \$netcnx->{dhcp_client}]
			);
	my $i = 0;
	foreach my $j (@conf_data) {
	    my $l = new Gtk2::Label($j->[0]);
	    $l->set_justify('left');
	    $infos[2*$i] = gtkpack_(Gtk2::HBox->new,
                                 1);
	    $vbox_local->pack_start($infos[2*$i],0,0,0);
	    if (defined $j->[2]) {
		my $c = new Gtk2::OptionMenu;
		$c->set_popdown_strings(@{$j->[2]});
		$infos[2*$i+1] = $c->entry;
		$infos[2*$i]->pack_start($c,0,0,0);
	    } else {
		$infos[2*$i+1] = new Gtk2::Entry();
		$infos[2*$i]->pack_start($infos[2*$i+1],0,0,0);
	    }
	    $infos[2*$i+1]->set_text(${$j->[1]});
	    $i++;
	}
	my $c = $_;
	my $widget_temp;
	if (-e "$prefix/etc/sysconfig/network-scripts/ifcfg-eth$c") {
	    $widget_temp = gtksignal_connect(new Gtk2::Button(ethisup($c) ? N("deactivate now") : N("activate now")),
					     clicked => sub {
						 system("/sbin/if" . (ethisup($c) ? "down" : "up") . " eth$c");
						 ugtk2::gtkbuttonset($_[0], ethisup($c) ? N("deactivate now") : N("activate now"));
					     });
	} else {
	    $widget_temp = N("This interface has not been configured yet.\nLaunch the configuration wizard in the main window");
	}
	$vbox_local->pack_start(gtkpack__(new Gtk2::HBox(0,0),
					  $widget_temp
					 ),0,0,0);
	#	$list->append($_+1, "eth$_", $intf->{"eth$_"}{IPADDR}, $intf->{"eth$_"}{BOOTPROTO}, $all_cards[$_]->[1]);
	#	$list->set_selectable($_, 0);
	$notebook->append_page($vbox_local, Gtk2::Label->new("eth$_"));
    }
    my $bbox8 = new Gtk2::HButtonBox;
    $vbox0->pack_start($bbox8,0,0,10);
    $bbox8->set_layout('end');
    my $button_ok = Gtk2::Button->new_from_stock('gtk-ok');
    $button_ok->signal_connect(clicked => sub {
	foreach (0..$#all_cards) {
	    my @infos = @{$card_tab[2*$_]};
	    each_index {
		${$_->[1]} = $infos[2*$::i+1]->get_text;
	    } @{$card_tab[2*$_+1]};
	    if ($intf->{"eth$_"}{BOOTPROTO} eq "dhcp") {
		delete @{$intf->{"eth$_"}}{qw(IPADDR NETWORK NETMASK BROADCAST)};
	    }
	}
	update();
	$button_apply->set_sensitive(1);
	$window->destroy; Gtk2->main_quit;
    });
    $window->action_area->pack_start(gtkpack(Gtk2::HButtonBox->new,
                                             gtksignal_connect(Gtk2::Button->new_from_stock('gtk-cancel'),
                                                               clicked => sub { $window->destroy; Gtk2->main_quit }),
                                             $button_ok,
                                            ),
                                     1, 1, 0,
                                     );

    $window->show_all;
    foreach (0..$#all_cards) {
	my @infos = @{$card_tab[2*$_]};
	$intf->{"eth$_"}{BOOTPROTO} eq "dhcp" or $infos[8]->hide;
    }
    $window->run;
}


sub configure_net {
    my ($_prefix, $netcnx, $netc, $_intf) = @_;
    if (!$netcnx->{type}) {
	my $dialog = _create_dialog(N("LAN configuration"));
	$dialog->vbox->pack_start(new Gtk2::Label(N("You don't have an Internet connection.
Create one first by clicking on 'Configure'")),1,1,0);
	my $bbox_dialog = new Gtk2::HButtonBox;
	$dialog->action_area->add($bbox_dialog);
	$bbox_dialog->set_layout('end');
	my $button_ok = Gtk2::Button->new_from_stock('gtk-ok');
	$button_ok->signal_connect(clicked => sub {
					 Gtk2->main_quit;
				     });
	$bbox_dialog->add($button_ok);
	$dialog->show_all;
	$dialog->run;
	$dialog->destroy;
	return;
    }
    my $cnx = {};
    $cnx = $netcnx->{$netcnx->{type}};
    my $window = _create_dialog(N("Internet connection configuration"));
    $window->signal_connect(delete_event => sub { Gtk2->main_quit });
    $window->set_border_width(10);

    my $vbox2 = new Gtk2::VBox(0,0);
    my $i = 0;
    my @mask;
@mask = (0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0) if $netcnx->{type} eq 'lan';
@mask = (0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1) if $netcnx->{type} eq 'isdn_internal' && defined $cnx->{vendor} && defined $cnx->{id};
@mask = (1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1) if $netcnx->{type} eq 'isdn_internal' && (!defined $cnx->{vendor} || !defined $cnx->{id});
@mask = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0) if $netcnx->{type} eq 'modem' || $netcnx->{type} eq 'isdn_external';
@mask = (0,0,0,0,0,0,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0) if $netcnx->{type} =~ /adsl/;
@mask = (0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0) if $netcnx->{type} eq 'cable';

    #- duplicated code (waiting for 9.1 to be out to merge everything correctly, avoid bug elsewhere).
    if ($netcnx->{type} =~ /adsl/) {
	require network::adsl;
	network::adsl::adsl_probe_info($cnx, $netc, $intf);
    }
    my @conf_data = ([ N("Card IRQ"), \$cnx->{irq} ],
		     [ N("Card mem (DMA)"), \$cnx->{mem} ],
		     [ N("Card IO"), \$cnx->{io} ],
		     [ N("Card IO_0"), \$cnx->{io0} ],
		     [ N("Card IO_1"), \$cnx->{io1} ],
		     [ N("Your personal phone number"), \$cnx->{phone_in} ],
		     [ N("Provider name (ex provider.net)"), \$netc->{DOMAINNAME2} ],
		     [ N("Provider phone number"), \$cnx->{phone_out} ],
		     [ N("Provider dns 1 (optional)"), \$netc->{dnsServer2} ],
		     [ N("Provider dns 2 (optional)"), \$netc->{dnsServer3} ],
		     [ N("Account Login (user name)"), \$cnx->{login} ],
		     [ N("Account Password"), \$cnx->{passwd} ],
		     [ N("Dialing mode"), \$cnx->{dialing_mode}, [ "auto", "manual" ] ],
		     [ N("Gateway"), \$netc->{GATEWAY} ],
		     [ N("Connection name"), \$cnx->{connection} ],
		     [ N("Phone number"), \$cnx->{phone} ],
		     [ N("Login ID"), \$cnx->{login} ],
		     [ N("Password"), \$cnx->{passwd} ],
		     [ N("Authentication"), \$cnx->{auth}, [ N("PAP"), N("Terminal-based"), N("Script-based"), N_("CHAP") ] ],
		     [ N("Domain name"), \$cnx->{domain} ],
		     [ N("First DNS Server (optional)"), \$cnx->{dns1} ],
		     [ N("Second DNS Server (optional)"), \$cnx->{dns2} ],
		     [ N("Ethernet Card"), \$netc->{NET_DEVICE}, [ 'eth0', 'eth1', 'eth2', 'eth3', 'eth4', 'eth5', 'eth6', 'eth7', 'eth8', 'eth9' ] ],
		     [ N("DHCP Client"), \$netcnx->{dhcp_client}, ["dhcp-client", "dhcpcd", "dhcpxd"] ],
		     [ N("Connection speed"), \$cnx->{speed}, ["64 Kb/s", "128 Kb/s"] ],
		     [ N("Connection timeout (in sec)"), \$cnx->{huptimeout} ]
);
    my @infos;
    foreach (@conf_data) {
        if (!$mask[$i]) {
            $i++;
            next;
        }
        $infos[2*$i] = new Gtk2::HBox(0,0);
        my $l = new Gtk2::Label($_->[0]);
        $l->set_justify('left');
        $infos[2*$i]->pack_start($l, 0, 0, 0);
        $vbox2->pack_start($infos[2*$i], 0, 0, 0);
        if (defined $_->[2]) {
            my $c = new Gtk2::Combo();
            $c->set_popdown_strings(@{$_->[2]});
            $infos[2*$i+1] = $c->entry;
            $infos[2*$i]->pack_start($c,0 , 0, 0);
        } else {
            $infos[2*$i+1] = new Gtk2::Entry();
            $infos[2*$i]->pack_start($infos[2*$i+1], 0, 0, 0);
            #hide password if Entry Password
            if ($_->[0] eq N("Account Password") || $_->[0] eq N("Password")) { $infos[2*$i+1]->set_visibility(0) };
        }
        $infos[2*$i+1]->set_text(${$_->[1]});
        $i++;
    }


    $window->vbox->pack_start(gtkpack__(new Gtk2::VBox(0, 0),
                                        new Gtk2::Label(N("Internet Connection Configuration")),
                                        new Gtk2::HSeparator,
                                            my $table1 = create_packtable({ col_spacings => 5, row_spacings => 5, homogenous => 1 },
                                                                          [ Gtk2::Label->new(N("Profile: ")), 
                                                                            Gtk2::Label->new(translate($netcnx->{PROFILE})) ],
                                                                          [ Gtk2::Label->new(N("Connection type: ")), 
                                                                            Gtk2::Label->new(translate($netcnx->{type})) ],
                                                                         ),
                                        new Gtk2::HSeparator,
                                        gtkadd(Gtk2::Frame->new(N("Parameters")), $vbox2),
                                       ),
                              1, 1, 0
                             );
    $window->action_area->pack_start(gtkpack(Gtk2::HButtonBox->new,
                                             gtksignal_connect(Gtk2::Button->new_from_stock('gtk-ok'), clicked => sub {
                                                                   each_index {
                                                                       ${$conf_data[$::i][1]} = $infos[2*$::i+1]->get_text if $_;
                                                                   } @mask;
                                                                   update();
                                                                   $button_apply->set_sensitive(1);
                                                                   $window->destroy; Gtk2->main_quit;
                                                               }),
                                             gtksignal_connect(Gtk2::Button->new_from_stock('gtk-cancel'),
                                                               clicked => sub { $window->destroy; Gtk2->main_quit })
                                            ),
                                     1, 1, 0
                                    );

    $window->show_all;
    $window->run;
}
' href='#n1610'>1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847
msgid ""
msgstr ""
"Project-Id-Version: initscripts\n"
"PO-Revision-Date: 2001-08-16 00:07+01:00\n"
"Last-Translator: Thiago Vinhas de Moraes <thiago@vinhas.com.br>\n"
"Language-Team: Brazilian Portuguese <pt@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"

#: /etc/rc.d/init.d/ip6tables:83 /etc/rc.d/init.d/ipchains:72
#: /etc/rc.d/init.d/iptables:83
msgid "Resetting built-in chains to the default ACCEPT policy:"
msgstr "Reiniciando as configurações da política de permissões padrão:"

#: /etc/rc.d/init.d/amd:39 /etc/rc.d/init.d/anacron:25
#: /etc/rc.d/init.d/arpwatch:35 /etc/rc.d/init.d/atd:39
#: /etc/rc.d/init.d/bootparamd:38 /etc/rc.d/init.d/crond:33
#: /etc/rc.d/init.d/httpd:54 /etc/rc.d/init.d/identd:54
#: /etc/rc.d/init.d/junkbuster:34 /etc/rc.d/init.d/kadmin:47
#: /etc/rc.d/init.d/kprop:37 /etc/rc.d/init.d/krb524:37
#: /etc/rc.d/init.d/krb5kdc:37 /etc/rc.d/init.d/ldap:63
#: /etc/rc.d/init.d/ldap:70 /etc/rc.d/init.d/lpd:57 /etc/rc.d/init.d/mysqld:52
#: /etc/rc.d/init.d/mysqld:54 /etc/rc.d/init.d/named:58
#: /etc/rc.d/init.d/nscd:58 /etc/rc.d/init.d/portmap:60
#: /etc/rc.d/init.d/pxe:32 /etc/rc.d/init.d/radvd:45 /etc/rc.d/init.d/rarpd:32
#: /etc/rc.d/init.d/rwalld:33 /etc/rc.d/init.d/snmpd:29
#: /etc/rc.d/init.d/tWnn:42 /etc/rc.d/init.d/ups:61 /etc/rc.d/init.d/xinetd:66
#, fuzzy
msgid "Stopping $prog: "
msgstr "Parando $prog: "

#: /etc/rc.d/init.d/smb:58 /etc/rc.d/init.d/smb:63 /etc/rc.d/init.d/winbind:51
msgid "Shutting down $KIND services: "
msgstr "Desligando os serviços $KIND: "

#: /etc/rc.d/init.d/ypbind:34
#, fuzzy
msgid "Binding to the NIS domain: "
msgstr "Efetuando a ligação ao domínio NIS... "

#: /etc/sysconfig/network-scripts/ifup-ppp:42
#, fuzzy
msgid "pppd does not exist or is not executable"
msgstr "O /usr/sbin/pppd não existe ou não é executável"

#: /etc/rc.d/init.d/functions:283
msgid "${base} (pid $pid) is running..."
msgstr "O ${base} (pid $pid) está a rodando..."

#: /etc/rc.d/init.d/crond:51
msgid "Reloading cron daemon configuration: "
msgstr "Recarregando a configuração do servidor cron: "

#: /etc/rc.d/rc.sysinit:525
msgid "*** An error occurred during the RAID startup"
msgstr "*** Ocorreu um erro durante a inicialização do RAID"

#: /etc/rc.d/rc.sysinit:63
#, fuzzy
msgid "Unmounting initrd: "
msgstr "Desmontando o initrd: "

#: /etc/sysconfig/network-scripts/ifup-ipv6:168
msgid "Device 'tun6to4' (from '$DEVICE') is already up, shutdown first"
msgstr ""

#: /etc/rc.d/rc.sysinit:69
msgid "Configuring kernel parameters: "
msgstr "Configurando os parâmetros do núcleo: "

#: /etc/rc.d/init.d/netfs:147
#, fuzzy
msgid "/proc filesystem unavailable"
msgstr "O sistema de arquivos /proc não está disponível"

#: /etc/rc.d/init.d/kudzu:39
msgid "Checking for new hardware"
msgstr "Procurando novo hardware"

#: /etc/rc.d/init.d/ypbind:29 /etc/rc.d/init.d/ypserv:30
msgid "Setting NIS domain name $NISDOMAIN: "
msgstr "Configurando o domínio NIS como $NISDOMAIN: "

#: /etc/rc.d/init.d/gpm:54
msgid "Shutting down console mouse services: "
msgstr "Desligando os serviços do mouse no console: "

#: /etc/sysconfig/network-scripts/ifup-aliases:149
msgid "error in $FILE: already seen ipaddr $IPADDR in $ipseen"
msgstr "erro em $FILE: já encontrei o endereço ip $IPADDR em $ipseen"

#: /etc/rc.d/init.d/keytable:25
msgid "Loading keymap: "
msgstr "Carregando o mapa de teclado: "

#: /etc/rc.d/init.d/ip6tables:68 /etc/rc.d/init.d/ip6tables:69
#: /etc/rc.d/init.d/iptables:68 /etc/rc.d/init.d/iptables:69
msgid "Applying iptables firewall rules"
msgstr "Aplicar as regras de 'firewall' do iptables"

#: /etc/rc.d/init.d/functions:409 /etc/rc.d/rc.sysinit:268
msgid "$STRING"
msgstr "$STRING"

#: /etc/rc.d/init.d/halt:138 /etc/rc.d/init.d/netfs:61
msgid "Unmounting loopback filesystems: "
msgstr "Desmontando os sistemas de arquivos loopback: "

#: /etc/rc.d/init.d/autofs:245 /etc/rc.d/init.d/sshd:97
msgid "Starting $prog:"
msgstr "Inicializando o $prog:"

#: /etc/rc.d/init.d/innd:42
msgid "Stopping INND service: "
msgstr "Parando o serviço INND: "

#: /etc/rc.d/rc.sysinit:287 /etc/rc.d/rc.sysinit:535 /etc/rc.d/rc.sysinit:570
msgid "Automatic reboot in progress."
msgstr "Reinicío automático a decorrer."

#: /etc/rc.d/init.d/rwhod:23
msgid "Starting rwho services: "
msgstr "Inicializando os serviços rwho: "

#: /etc/rc.d/init.d/rawdevices:34 /etc/rc.d/init.d/rawdevices:41
msgid "   you'll have to upgrade your util-linux package"
msgstr "   terá de atualizar o pacote util-linux"

#: /etc/rc.d/init.d/iscsi:32
#, fuzzy
msgid "iscsi daemon already running"
msgstr "%s já está rodando"

#: /etc/rc.d/init.d/netfs:44
msgid "Mounting SMB filesystems: "
msgstr "Montando sistema de arquivos USB: "

#: /etc/rc.d/init.d/portmap:33
#, fuzzy
msgid "Networking not configured - exiting"
msgstr "A rede não está configurada - terminando"

#: /etc/sysconfig/network-scripts/ifup-aliases:311
msgid "error in $FILE: IPADDR_START and IPADDR_END don't argree"
msgstr "erro em $FILE: IPADDR_START e IPADDR_END não combinam"

#: /etc/rc.d/init.d/netfs:158 /etc/rc.d/init.d/network:236
msgid "Usage: $0 {start|stop|restart|reload|status}"
msgstr "Utilização: $0 {start|stop|restart|reload|status}"

#: /etc/rc.d/init.d/keytable:46
msgid "No status available for this package"
msgstr "Nenhum estado disponível para este pacote"

#: /etc/rc.d/init.d/routed:41
msgid "Stopping routed (RIP) services: "
msgstr "Parando o serviço routed (RIP): "

#: /etc/rc.d/init.d/rawdevices:31 /etc/rc.d/init.d/rawdevices:38
msgid "  Please correct your /etc/sysconfig/rawdevices:"
msgstr "  Por favor corrija o arquivo /etc/sysconfig/rawdevices:"

#: /etc/rc.d/init.d/sshd:85
msgid "Configuration file or keys are invalid"
msgstr ""

#: /etc/rc.d/init.d/halt:118
msgid "Syncing hardware clock to system time"
msgstr "Sincronizando o relógio de 'hardware' com a hora do sistema"

#: /etc/sysconfig/network-scripts/ifdown:12
#: /etc/sysconfig/network-scripts/ifdown:19
msgid "usage: ifdown <device name>"
msgstr "utilização: ifdown <nome do dispositivo>"

#: /etc/sysconfig/network-scripts/ifup-ippp:355
#: /etc/sysconfig/network-scripts/ifup-isdn:355
msgid "Warning: link doesn't support IPv6 using encapsulation 'rawip'"
msgstr ""

#: /etc/rc.d/init.d/autofs:224
msgid "Active Mount Points:"
msgstr "Pontos de Montagem Activos:"

#: /etc/rc.d/init.d/microcode_ctl:79
#, fuzzy
msgid "Usage: $0 {start|restart}"
msgstr "Utilização: $0 {start|stop}"

#: /etc/rc.d/rc.sysinit:335
msgid "Remounting root filesystem in read-write mode: "
msgstr "Remontando o sistema de arquivos / em modo leitura-escrita: "

#: /etc/rc.d/init.d/mars-nwe:23
msgid "Starting NetWare emulator-server: "
msgstr "Inicializando o emulador-servidor NetWare: "

#: /etc/rc.d/init.d/ypxfrd:31
#, fuzzy
msgid "Stopping YP map server: "
msgstr "Parando o serviço YP passwd: "

#: /etc/rc.d/init.d/microcode_ctl:59
msgid "$0: kernel does not have microcode device support"
msgstr ""

#: /etc/rc.d/init.d/postgresql:235
#, fuzzy
msgid "Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}"
msgstr "Utilização: $0 {start|stop|status|restart|condrestart|reload|probe}"

#: /etc/sysconfig/network-scripts/ifup-ipv6:186
msgid ""
"Given IPv4 address '$ipv4addr' is not globally usable, 6to4 configuration is "
"not valid"
msgstr ""

#: /etc/rc.d/init.d/halt:18
msgid "$1 "
msgstr "$1 "

#: /etc/sysconfig/network-scripts/network-functions-ipv6:142
msgid ""
"ERROR: [ipv6_log] Syslog is chosen, but binary 'logger' doesn't exist or "
"isn't executable"
msgstr ""

#: /etc/rc.d/init.d/random:46
msgid "The random data source is missing"
msgstr "A fonte de dados aleatórios não existe"

#: /etc/sysconfig/network-scripts/ifup-ipv6:258
msgid "6to4 configuration is not valid"
msgstr ""

#: /etc/rc.d/init.d/isdn:135
msgid "Unloading ISDN modules"
msgstr "Terminando os módulos de RDIS"

#: /etc/rc.d/init.d/apmd:26
msgid "Starting up APM daemon: "
msgstr "Inicializando o servidor APM: "

#: /etc/rc.d/init.d/postgresql:123
#, fuzzy
msgid "Initializing database: "
msgstr "Inicializando a base de dados MySQL: "

#: /etc/rc.d/init.d/ipchains:110 /etc/rc.d/init.d/ipchains:111
msgid "Saving current rules to $IPCHAINS_CONFIG"
msgstr "Gravando as regras atuais como $IPCHAINS_CONFIG"

#: /etc/rc.d/init.d/autofs:246 /etc/rc.d/init.d/autofs:291
#: /etc/rc.d/init.d/autofs:292
msgid "could not make temp file"
msgstr "não consegui criar um arquivo temporário"

#: /etc/sysconfig/network-scripts/ifup:153
#, fuzzy
msgid "Determining IP information for ${DEVICE}..."
msgstr "Determinando a informação IP para o ${DEVICE}..."

#: /etc/rc.d/init.d/ypbind:42
msgid "Listening for an NIS domain server."
msgstr "À escuta de um servidor de domínio NIS."

#: /etc/rc.d/init.d/iptables:66
msgid "Applying iptables firewall rules: "
msgstr "Aplicando as regras de 'firewall' do iptables: "

#: /etc/rc.d/init.d/pcmcia:121
msgid " cardmgr."
msgstr " cardmgr."

#: /etc/rc.d/init.d/random:26
#, fuzzy
msgid "Initializing random number generator: "
msgstr "Inicializando o gerador de números aleatórios: "

#: /etc/rc.d/init.d/amd:30 /etc/rc.d/init.d/anacron:15
#: /etc/rc.d/init.d/arpwatch:28 /etc/rc.d/init.d/atd:29
#: /etc/rc.d/init.d/bgpd:26 /etc/rc.d/init.d/bootparamd:29
#: /etc/rc.d/init.d/canna:26 /etc/rc.d/init.d/crond:24
#: /etc/rc.d/init.d/cWnn:31 /etc/rc.d/init.d/dhcpd:28
#: /etc/rc.d/init.d/FreeWnn:32 /etc/rc.d/init.d/gated:39
#: /etc/rc.d/init.d/httpd:46 /etc/rc.d/init.d/identd:45
#: /etc/rc.d/init.d/irda:20 /etc/rc.d/init.d/junkbuster:24
#: /etc/rc.d/init.d/kadmin:40 /etc/rc.d/init.d/kprop:30
#: /etc/rc.d/init.d/krb524:30 /etc/rc.d/init.d/krb5kdc:30
#: /etc/rc.d/init.d/kWnn:31 /etc/rc.d/init.d/ldap:38 /etc/rc.d/init.d/ldap:50
#: /etc/rc.d/init.d/lpd:28 /etc/rc.d/init.d/mysqld:40
#: /etc/rc.d/init.d/mysqld:42 /etc/rc.d/init.d/named:35
#: /etc/rc.d/init.d/nscd:49 /etc/rc.d/init.d/ntpd:50
#: /etc/rc.d/init.d/ospf6d:26 /etc/rc.d/init.d/ospfd:27
#: /etc/rc.d/init.d/portmap:50 /etc/rc.d/init.d/pxe:23
#: /etc/rc.d/init.d/radvd:38 /etc/rc.d/init.d/rarpd:22
#: /etc/rc.d/init.d/ripd:26 /etc/rc.d/init.d/ripngd:26
#: /etc/rc.d/init.d/rwalld:24 /etc/rc.d/init.d/sendmail:38
#: /etc/rc.d/init.d/snmpd:20 /etc/rc.d/init.d/squid:57
#: /etc/rc.d/init.d/tWnn:31 /etc/rc.d/init.d/ups:37
#: /etc/rc.d/init.d/vncserver:22 /etc/rc.d/init.d/xfs:58
#: /etc/rc.d/init.d/xinetd:45 /etc/rc.d/init.d/zebra:24
msgid "Starting $prog: "
msgstr "Inicializando o $prog: "

#: /etc/rc.d/rc.sysinit:279 /etc/rc.d/rc.sysinit:527 /etc/rc.d/rc.sysinit:562
msgid "*** when you leave the shell."
msgstr "*** quando sair da 'shell'."

#: /etc/rc.d/init.d/lpd:98 /etc/rc.d/init.d/rarpd:65
msgid "Usage: $0 {start|stop|restart|condrestart|reload|status}"
msgstr "Utilização: $0 {start|stop|restart|condrestart|reload|status}"

#: /etc/rc.d/init.d/network:188
msgid "Shutting down interface $i: "
msgstr "Desligando a interface $i: "

#: /etc/sysconfig/network-scripts/ifdown-sit:52
#: /etc/sysconfig/network-scripts/ifup-sit:62
msgid ""
"Device '$DEVICE' isn't supported here, use IPV6_AUTOTUNNEL setting and "
"restart (IPv6) networking"
msgstr ""

#: /etc/rc.d/init.d/network:227
msgid "Currently active devices:"
msgstr "Dispositivos activos de momento:"

#: /etc/rc.d/init.d/rawdevices:68
msgid "You need to be root to use this command ! "
msgstr "Tem de ser o root para executar este comando!"

#: /etc/rc.d/init.d/netfs:103
#, fuzzy
msgid "Unmounting NFS filesystems (retry): "
msgstr "Desmontando os sistemas de arquivos NFS (repetição): "

#: /etc/rc.d/rc.sysinit:197
msgid "Initializing USB mouse: "
msgstr "Inicializando o mouse USB: "

#: /etc/rc.d/rc.sysinit:194
msgid "Initializing USB keyboard: "
msgstr "Inicializando o teclado USB: "

#: /etc/rc.d/rc.sysinit:59
msgid "Mounting proc filesystem: "
msgstr "Montando o sistema de arquivo proc: "

#: /etc/rc.d/rc.sysinit:138
msgid "Loading default keymap: "
msgstr "Carregando o mapa de teclado padrão: "

#: /etc/sysconfig/network-scripts/ifup-ppp:43
msgid "ifup-ppp for ${DEVICE} exiting"
msgstr "ifup-ppp para ${DEVICE} terminando"

#: /etc/rc.d/rc.sysinit:429 /etc/rc.d/rc.sysinit:431
msgid "Finding module dependencies: "
msgstr "Procurando as dependências entre módulos: "

#: /etc/rc.d/init.d/autofs:260 /etc/rc.d/init.d/sshd:106
msgid "Stopping $prog:"
msgstr "Parando o $prog:"

#: /etc/rc.d/init.d/rawdevices:57
msgid "done"
msgstr "concluído"

#: /etc/rc.d/init.d/mysqld:88
#, fuzzy