summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/authentication.pm15
-rwxr-xr-xperl-install/standalone/drakauth2
-rwxr-xr-xperl-install/standalone/finish-install2
3 files changed, 10 insertions, 9 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;
}
diff --git a/perl-install/standalone/drakauth b/perl-install/standalone/drakauth
index 0a7a4a917..779976f52 100755
--- a/perl-install/standalone/drakauth
+++ b/perl-install/standalone/drakauth
@@ -29,7 +29,7 @@ $in->ask_from(N("Authentication"), authentication::kind2description(@kinds),
authentication::ask_parameters($in, $net, $authentication, $kind) or goto main;
eval {
- authentication::set($in, $net, $authentication);
+ authentication::set($in, $net, $authentication) or goto main;
network::network::write_network_conf($net); #- for NISDOMAIN
};
if (my $err = $@) {
diff --git a/perl-install/standalone/finish-install b/perl-install/standalone/finish-install
index 215756a7e..e938416b7 100755
--- a/perl-install/standalone/finish-install
+++ b/perl-install/standalone/finish-install
@@ -42,7 +42,7 @@ sub ask_authentication() {
authentication::set_root_passwd($superuser, $authentication);
eval {
- authentication::set($in, $net, $authentication);
+ authentication::set($in, $net, $authentication) or goto &ask_authentication;
network::network::write_network_conf($net);
};
if (my $err = $@) {