summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/authentication.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm
index 5ffe48465..1affd1a9c 100644
--- a/perl-install/authentication.pm
+++ b/perl-install/authentication.pm
@@ -80,10 +80,10 @@ sub ask_parameters {
}
if ($kind eq 'LDAP') {
- $net->{auth}{LDAPDOMAIN} ||= domain_to_ldap_domain($net->{resolv}{DOMAINNAME});
+ $authentication->{LDAPDOMAIN} ||= domain_to_ldap_domain($net->{resolv}{DOMAINNAME});
$in->ask_from('',
N("Authentication LDAP"),
- [ { label => N("LDAP Base dn"), val => \$net->{auth}{LDAPDOMAIN} },
+ [ { label => N("LDAP Base dn"), val => \$authentication->{LDAPDOMAIN} },
{ label => N("LDAP Server"), val => \$authentication->{LDAP_server} },
]) or return;
} elsif ($kind eq 'AD') {
@@ -142,14 +142,14 @@ The command 'wbinfo -t' will test whether your authentication secrets are good."
$authentication->{AD_domain} ||= $net->{resolv}{DOMAINNAME} if $kind eq 'SMBKRB';
$authentication->{AD_users_idmap} ||= 'ou=idmap,' . domain_to_ldap_domain($authentication->{AD_domain}) if $kind eq 'SMBKRB';
- $net->{auth}{WINDOMAIN} ||= $net->{resolv}{DOMAINNAME};
+ $authentication->{WINDOMAIN} ||= $net->{resolv}{DOMAINNAME};
my $anonymous;
$in->ask_from('',
$kind eq 'SMBKRB' ? N("Authentication Active Directory") : N("Authentication Windows Domain"),
[ if_($kind eq 'SMBKRB',
{ label => N("Domain"), val => \$authentication->{AD_domain} }
),
- { label => N("Windows Domain"), val => \$net->{auth}{WINDOMAIN} },
+ { label => N("Windows Domain"), val => \$authentication->{WINDOMAIN} },
{ label => N("Domain Admin User Name"), val => \$authentication->{winuser} },
{ label => N("Domain Admin Password"), val => \$authentication->{winpass}, hidden => 1 },
{ label => N("Use Idmap for store UID/SID "), val => \$anonymous, type => 'bool' },
@@ -229,7 +229,7 @@ sub set {
} elsif ($kind eq 'LDAP') {
$in->do_pkgs->install(qw(openldap-clients nss_ldap pam_ldap autofs));
- my $domain = $net->{auth}{LDAPDOMAIN} || do {
+ my $domain = $authentication->{LDAPDOMAIN} || do {
my $s = run_program::rooted_get_stdout($::prefix, 'ldapsearch', '-x', '-h', $authentication->{LDAP_server}, '-b', '', '-s', 'base', '+');
first($s =~ /namingContexts: (.+)/);
} or log::l("no ldap domain found on server $authentication->{LDAP_server}"), return;
@@ -323,7 +323,7 @@ sub set {
#- TODO: also do it during install since nis can be useful to resolve domain names. Not done because 9.2-RC
} elsif ($kind eq 'winbind') {
- my $domain = uc $net->{auth}{WINDOMAIN};
+ my $domain = uc $authentication->{WINDOMAIN};
$in->do_pkgs->install('samba-winbind');
@@ -341,7 +341,7 @@ sub set {
});
} elsif ($kind eq 'SMBKRB') {
$authentication->{AD_server} ||= 'ads.' . $authentication->{AD_domain};
- my $domain = uc $net->{auth}{WINDOMAIN};
+ my $domain = uc $authentication->{WINDOMAIN};
my $realm = $authentication->{AD_domain};
configure_krb5_for_AD($authentication);
amp;& $ARGV[0] eq '-u') {
- -d $boot_prefix or die "$boot_prefix doesn't exist";
+ -d $light_prefix or return;
- foreach my $dest (@list) {
+ foreach my $dest (@$list) {
my $orig = $dest;
- $orig =~ s|^$prefix|$boot_prefix|;
+ $orig =~ s|^$prefix|$light_prefix|;
next if !-e $orig;
@@ -24,40 +40,38 @@ if (@ARGV && $ARGV[0] eq '-u') {
rename $orig, $dest or die "moving $orig to $dest failed: $!\n";
}
}
- rmdir($_) foreach reverse(chomp_(`find $boot_prefix -type d`));
+ rmdir($_) foreach reverse(chomp_(`find $light_prefix -type d`));
- if (-e $boot_prefix) {
+ if (-e $light_prefix) {
print "still there:\n";
- system('find', $boot_prefix);
+ system('find', $light_prefix);
foreach my $dest (chomp_(`find $prefix -type l`)) {
my $orig = readlink($dest) or next;
- $orig =~ s!/image_boot/!$boot_prefix/! or next;
+ $orig =~ s!/image_$live_name/!$light_prefix/! or next;
unlink $dest or die "removing $dest failed: $!\n";
rename $orig, $dest or die "moving $orig to $dest failed: $!\n";
}
- rmdir($_) foreach reverse(chomp_(`find $boot_prefix -type d`));
+ rmdir($_) foreach reverse(chomp_(`find $light_prefix -type d`));
}
- if (-e $boot_prefix) {
+ if (-e $light_prefix) {
print "still there:\n";
- system('find', $boot_prefix);
+ system('find', $light_prefix);
}
+}
-} else {
- -e $boot_prefix and die "you can't make_live_tree_boot since one already exists
-Maybe you should remove it first with 'make_live_tree_boot -u'\n";
-
- foreach my $orig (@list) {
- my $dest = $orig;
- $dest =~ s|^$prefix|$boot_prefix|;
+my $prefix = '/tmp/live_tree';
+my ($boot_prefix, $always_prefix) = ('/tmp/live_tree_boot', '/tmp/live_tree_always');
+my @boot_list = chomp_(cat_('data/boot.list'));
+my @always_list = chomp_(cat_('data/always.list'));
- my $link = $orig;
- $link =~ s|^$prefix|/image_boot|;
+@boot_list = difference2(\@boot_list, \@always_list);
- mkdir_p(dirname($dest));
- rename $orig, $dest or die "moving $orig to $dest failed: $!\n";
+remove_light_tree('boot', $prefix, $boot_prefix, \@boot_list);
+remove_light_tree('always', $prefix, $always_prefix, \@always_list);
- symlink $link, $orig or die "symlinking from $dest to $orig failed: $!\n";
- }
+if (!@ARGV) {
+ create_light_tree('boot', $prefix, $boot_prefix, \@boot_list);
+ create_light_tree('always', $prefix, $always_prefix, \@always_list);
}