diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-09-05 09:25:01 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-09-05 09:25:01 +0000 |
commit | 39090f72ad4c4eb25f99e457ebbb78a765d8acc1 (patch) | |
tree | c262b59a3c53e75566700520c30379356ecbe318 /perl-install/authentication.pm | |
parent | 52e73a5e6467ad49775c7b8915826f6d5828d146 (diff) | |
download | drakx-backup-do-not-use-39090f72ad4c4eb25f99e457ebbb78a765d8acc1.tar drakx-backup-do-not-use-39090f72ad4c4eb25f99e457ebbb78a765d8acc1.tar.gz drakx-backup-do-not-use-39090f72ad4c4eb25f99e457ebbb78a765d8acc1.tar.bz2 drakx-backup-do-not-use-39090f72ad4c4eb25f99e457ebbb78a765d8acc1.tar.xz drakx-backup-do-not-use-39090f72ad4c4eb25f99e457ebbb78a765d8acc1.zip |
handle required package(s) not installed correctly (bugzilla #18180)
Diffstat (limited to 'perl-install/authentication.pm')
-rw-r--r-- | perl-install/authentication.pm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm index 7162e1c0e..53fd50e81 100644 --- a/perl-install/authentication.pm +++ b/perl-install/authentication.pm @@ -91,7 +91,7 @@ sub ask_parameters { $authentication->{AD_domain} ||= $net->{resolv}{DOMAINNAME}; $authentication->{AD_users_db} ||= 'cn=users,' . domain_to_ldap_domain($authentication->{AD_domain}); - $in->do_pkgs->install(qw(perl-Net-DNS)); + $in->do_pkgs->ensure_are_installed([ 'perl-Net-DNS' ], 1) or return; my @srvs = query_srv_names($authentication->{AD_domain}); $authentication->{AD_server} ||= $srvs[0] if @srvs; @@ -225,9 +225,9 @@ sub set { if ($kind eq 'local') { } elsif ($kind eq 'SmartCard') { - $in->do_pkgs->install('castella-pam'); + $in->do_pkgs->ensure_are_installed([ 'castella-pam'], 1) or return; } elsif ($kind eq 'LDAP') { - $in->do_pkgs->install(qw(openldap-clients nss_ldap pam_ldap autofs)); + $in->do_pkgs->ensure_are_installed([ qw(openldap-clients nss_ldap pam_ldap autofs) ]) or return; my $domain = $authentication->{LDAPDOMAIN} || do { my $s = run_program::rooted_get_stdout($::prefix, 'ldapsearch', '-x', '-h', $authentication->{LDAP_server}, '-b', '', '-s', 'base', '+'); @@ -242,7 +242,7 @@ sub set { nss_base_group => $domain . "?sub", ); } elsif ($kind eq 'AD') { - $in->do_pkgs->install(qw(nss_ldap pam_krb5 libsasl2-plug-gssapi)); + $in->do_pkgs->ensure_are_installed([ qw(nss_ldap pam_krb5 libsasl2-plug-gssapi) ]) or return; my $port = "389"; my $ssl = { @@ -302,7 +302,7 @@ sub set { configure_krb5_for_AD($authentication); } elsif ($kind eq 'NIS') { - $in->do_pkgs->install(qw(ypbind autofs)); + $in->do_pkgs->ensure_are_installed([ qw(ypbind autofs) ], 1) or return; my $domain = $net->{network}{NISDOMAIN}; $domain || $authentication->{NIS_server} ne "broadcast" or die N("Can not use broadcast with no NIS domain"); my $t = $domain ? "domain $domain" . ($authentication->{NIS_server} ne "broadcast" && " server") : "ypserver"; @@ -325,7 +325,7 @@ sub set { my $domain = uc $authentication->{WINDOMAIN}; - $in->do_pkgs->install('samba-winbind'); + $in->do_pkgs->ensure_are_installed([ 'samba-winbind' ], 1) or return; require network::smb; network::smb::write_smb_conf($domain); @@ -345,7 +345,7 @@ sub set { my $realm = $authentication->{AD_domain}; configure_krb5_for_AD($authentication); - $in->do_pkgs->install('samba-winbind', 'pam_krb5', 'samba-server', 'samba-client'); + $in->do_pkgs->ensure_are_installed([ 'samba-winbind', 'pam_krb5', 'samba-server', 'samba-client' ]) or return; require network::smb; network::smb::write_smb_ads_conf($domain,$realm); @@ -359,6 +359,7 @@ sub set { run_program::rooted($::prefix, 'net', 'ads', 'join', '-U', $authentication->{winuser} . '%' . $authentication->{winpass}); }); } + 1; } |