summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-02-17 17:53:16 +0000
committerOlivier Blin <oblin@mandriva.org>2005-02-17 17:53:16 +0000
commit7805c03ff64b7ca0c29b34f787fdee11f77a1986 (patch)
tree87c3eab23446c45d38a722169f3d72cbc4dc93f7
parent6dddd2e147067299f8d4c42348fedfc7a74f4656 (diff)
downloaddrakx-backup-do-not-use-7805c03ff64b7ca0c29b34f787fdee11f77a1986.tar
drakx-backup-do-not-use-7805c03ff64b7ca0c29b34f787fdee11f77a1986.tar.gz
drakx-backup-do-not-use-7805c03ff64b7ca0c29b34f787fdee11f77a1986.tar.bz2
drakx-backup-do-not-use-7805c03ff64b7ca0c29b34f787fdee11f77a1986.tar.xz
drakx-backup-do-not-use-7805c03ff64b7ca0c29b34f787fdee11f77a1986.zip
perl_checker fixes
-rw-r--r--perl-install/network/tools.pm4
-rwxr-xr-xperl-install/standalone/drakconnect42
-rwxr-xr-xperl-install/standalone/drakgw9
3 files changed, 27 insertions, 28 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index d9034015e..411e37267 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -275,11 +275,11 @@ sub get_default_metric {
$idx * 10;
}
-sub ndiswrapper_installed_drivers {
+sub ndiswrapper_installed_drivers() {
`ndiswrapper -l` =~ /(\w+)\s+driver present/mg;
}
-sub ndiswrapper_available_drivers {
+sub ndiswrapper_available_drivers() {
`ndiswrapper -l` =~ /(\w+)\s+driver present, hardware present/mg;
}
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index 181527f46..00051fdee 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -68,7 +68,7 @@ local $_ = join '', @ARGV;
/--old/ and goto old;
if (/--install/) {
$::isInstall = 1;
- add_intf()
+ add_intf();
}
/--internet/ and configure_net($netcnx, $netc, $intf);
@@ -275,7 +275,7 @@ sub build_tree {
$intf->{save} = sub {
$netc->{internet_cnx_choice} = 'adsl';
$netc->{at_boot} = $intf->{ONBOOT} eq 'yes' ? 1 : 0;
- network::adsl::adsl_conf_backend($in, $modules_conf, $netcnx, $netc, $intf, $interface_name, $protocol)
+ network::adsl::adsl_conf_backend($in, $modules_conf, $netcnx, $netc, $intf, $interface_name, $protocol);
};
}
elsif ($interface eq 'modem') {
@@ -309,13 +309,15 @@ sub build_notebook {
Gtk2::Label->new(N("Protocol")),
$gui->{intf}{BOOTPROTO} = gtksignal_connect(Gtk2::ComboBox->new_text,
changed => sub {
- return if !$_[0]->realized;
- my $proto = $gui->{intf}{BOOTPROTO};
- my $protocol = $intf->{BOOTPROTO} = { reverse %{$proto->{protocols}} }->{$proto->get_text};
-
- foreach ($gui->{intf}{IPADDR}, $gui->{intf}{NETMASK}, $gui->{netc}{GATEWAY}) {
- $_->set_sensitive($protocol eq "static" ? 1 : 0)
- }; $apply->() },
+ return if !$_[0]->realized;
+ my $proto = $gui->{intf}{BOOTPROTO};
+ my $protocol = $intf->{BOOTPROTO} = { reverse %{$proto->{protocols}} }->{$proto->get_text};
+
+ foreach ($gui->{intf}{IPADDR}, $gui->{intf}{NETMASK}, $gui->{netc}{GATEWAY}) {
+ $_->set_sensitive($protocol eq "static" ? 1 : 0);
+ }
+ $apply->();
+ },
),
),
),
@@ -359,8 +361,8 @@ sub build_notebook {
$proto->set_popdown_strings(values %{$proto->{protocols}});
$proto->set_text($proto->{protocols}{$intf->{BOOTPROTO} || 'none'});
foreach ($gui->{intf}{IPADDR}, $gui->{intf}{NETMASK}, $gui->{netc}{GATEWAY}) {
- $_->set_sensitive($intf->{BOOTPROTO} eq 'static' ? 1 : 0)
- };
+ $_->set_sensitive($intf->{BOOTPROTO} eq 'static' ? 1 : 0);
+ }
} else {
$_->set_sensitive(0) foreach $gui->{intf}{IPADDR}, $gui->{intf}{NETMASK};
delete $gui->{intf}{BOOTPROTO};
@@ -487,7 +489,7 @@ sub build_notebook {
gtkpack__(Gtk2::HBox->new, $gui->{intf}{$_->[1]} = gtksignal_connect(Gtk2::ComboBox->new_text,
changed => $apply)),
),
- ),
+ )
} ([ N("Flow control"), 'FlowControl' ],
[ N("Line termination"), 'Enter' ],
[ N("Connection speed"), 'Speed' ],
@@ -684,7 +686,7 @@ sub del_intf() {
list => [ keys %$intf ],
format => sub {
my $type = network::tools::get_interface_type($intf->{$_[0]});
- $ethernet_names{$_[0]} || ($type ? "$type ($_[0])" : $_[0])
+ $ethernet_names{$_[0]} || ($type ? "$type ($_[0])" : $_[0]);
}
}
],
@@ -710,11 +712,9 @@ sub del_intf() {
},
end => {
name => sub {
- ($faillure ?
- N("An error occurred while deleting the \"%s\" network interface:\n\n%s",
- $intf2delete, $faillure) :
- N("Congratulations, the \"%s\" network interface has been successfully deleted", $intf2delete)
- )
+ $faillure ?
+ N("An error occurred while deleting the \"%s\" network interface:\n\n%s", $intf2delete, $faillure)
+ : N("Congratulations, the \"%s\" network interface has been successfully deleted", $intf2delete);
},
end => 1,
},
@@ -771,7 +771,7 @@ sub apply {
}
sub ethisup { `LC_ALL=C LANGUAGE=C /sbin/ifconfig $_[0]` =~ /inet/ }
-sub chk_internet() { `LC_ALL=C LANGUAGE=C /sbin/chkconfig --list | grep internet` =~ /:on/ ? 1 : 0 };
+sub chk_internet() { `LC_ALL=C LANGUAGE=C /sbin/chkconfig --list | grep internet` =~ /:on/ ? 1 : 0 }
sub update_intbutt() {
$int_state->set($isconnected ? N("Connected") : N("Not connected"));
@@ -836,7 +836,7 @@ sub quit_global() {
sub get_intf_status {
my ($c) = @_;
- ethisup($c) ? N("Deactivate now") : N("Activate now")
+ ethisup($c) ? N("Deactivate now") : N("Activate now");
}
sub configure_lan() {
@@ -1036,7 +1036,7 @@ Run the \"Add Connection\" assistant from the Mandrakelinux Control Center"));
gtksignal_connect(Gtk2::Button->new(N("Ok")), clicked => sub {
foreach my $i (0..$#conf_data) {
${$conf_data[$i][1]} = $infos[2*$i+1]->get_text;
- };
+ }
# called from old GUI?
if ($label_host) {
update();
diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw
index d00cba315..34d8a5b99 100755
--- a/perl-install/standalone/drakgw
+++ b/perl-install/standalone/drakgw
@@ -81,7 +81,6 @@ sub start_daemons () {
system("/etc/rc.d/init.d/squid status >/dev/null") == 0 and sys("/etc/rc.d/init.d/squid stop");
system("/etc/rc.d/init.d/named status >/dev/null 2>/dev/null") == 0 and sys("/etc/rc.d/init.d/named stop");
- my $netscripts = '/etc/sysconfig/network-scripts';
sys("/etc/rc.d/init.d/network restart >/dev/null");
sys("/etc/rc.d/init.d/$_ start >/dev/null"), sys("/sbin/chkconfig --level 345 $_ on") foreach 'named', 'dhcpd', 'squid';
@@ -130,7 +129,7 @@ What would you like to do?"),
foreach ($dhcpd_conf, $squid_conf, $masq_file) {
rename($_, "$_.old") if -f $_;
rename("$_.drakgwdisable", $_) or die "Could not find configuration. Please reconfigure.";
- };
+ }
{
my $_wait_enabl = $in->wait_message('', N("Enabling servers..."));
start_daemons();
@@ -159,7 +158,7 @@ What would you like to do?"),
stop_daemons();
}
foreach ($dhcpd_conf, $squid_conf, $masq_file) {
- if (-f $_) { rename($_, "$_.drakgwdisable") or die "Could not rename $_ to $_.drakgwdisable" };
+ if (-f $_) { rename($_, "$_.drakgwdisable") or die "Could not rename $_ to $_.drakgwdisable" }
}
print "remove rules entries\n";
substInFile {
@@ -227,7 +226,7 @@ Examples:
my @cards = grep {
log::l("[drakgw] Have network card: $_");
- $_ ne $card_netconnect
+ $_ ne $card_netconnect;
} detect_devices::getNet();
push @cards, $card_netconnect if $::testing;
log::l("[drakgw] Available network cards: ", join(", ", @cards));
@@ -607,5 +606,5 @@ quit_global($in, 0);
sub quit_global {
my ($in, $exitcode) = @_;
$in->exit($exitcode);
- goto begin
+ goto begin;
}