summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-08-18 14:51:00 +0000
committerOlivier Blin <oblin@mandriva.org>2005-08-18 14:51:00 +0000
commitbd4044479462649a08687575c579ff3632c6fc39 (patch)
tree287c40ed8cf23b8b879776d6d718829e74171db2
parentc189670352481b263a453cdd063df7243a03b4b3 (diff)
downloaddrakx-bd4044479462649a08687575c579ff3632c6fc39.tar
drakx-bd4044479462649a08687575c579ff3632c6fc39.tar.gz
drakx-bd4044479462649a08687575c579ff3632c6fc39.tar.bz2
drakx-bd4044479462649a08687575c579ff3632c6fc39.tar.xz
drakx-bd4044479462649a08687575c579ff3632c6fc39.zip
install bpalogin if needed only
-rw-r--r--perl-install/network/netconnect.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index da095d2c2..2d6ca6b9f 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -316,14 +316,15 @@ sub real_main {
{ label => N("Account Password"), val => \$net->{cable}{passwd}, hidden => 1, disabled => $cable_no_auth },
];
},
+ complete => sub {
+ !$cable_no_auth->() && !$in->do_pkgs->ensure_is_installed('bpalogin', '/usr/sbin/bpalogin');
+ },
post => sub {
- my $use_bpalogin = !$cable_no_auth->();
- if ($in->do_pkgs->install("bpalogin")) {
- substInFile {
- s/username\s+.*\n/username $net->{cable}{login}\n/;
- s/password\s+.*\n/password $net->{cable}{passwd}\n/;
- } "$::prefix/etc/bpalogin.conf";
- }
+ my $use_bpalogin = !$cable_no_auth->();
+ $use_bpalogin and substInFile {
+ s/username\s+.*\n/username $net->{cable}{login}\n/;
+ s/password\s+.*\n/password $net->{cable}{passwd}\n/;
+ } "$::prefix/etc/bpalogin.conf";
services::set_status("bpalogin", $use_bpalogin);
$auto_ip = 1;
return "lan";