summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2006-02-23 09:36:51 +0000
committerOlivier Blin <oblin@mandriva.org>2006-02-23 09:36:51 +0000
commit4808dba37976e9f3e420ada5c6d0475ecda3851b (patch)
treed3be3650a3623bc6de3830e3248ac512b106d224 /perl-install/standalone
parentf6297c8c070d3777fa7a350fd3f2b73717fb5836 (diff)
downloaddrakx-4808dba37976e9f3e420ada5c6d0475ecda3851b.tar
drakx-4808dba37976e9f3e420ada5c6d0475ecda3851b.tar.gz
drakx-4808dba37976e9f3e420ada5c6d0475ecda3851b.tar.bz2
drakx-4808dba37976e9f3e420ada5c6d0475ecda3851b.tar.xz
drakx-4808dba37976e9f3e420ada5c6d0475ecda3851b.zip
allow to rename an old user (possibly "guest" from a live distribution) instead of creating a new one, using info from first added user in finish-install (backport from HEAD)
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/finish-install7
1 files changed, 7 insertions, 0 deletions
diff --git a/perl-install/standalone/finish-install b/perl-install/standalone/finish-install
index 02f0b5310..c44b73cc7 100755
--- a/perl-install/standalone/finish-install
+++ b/perl-install/standalone/finish-install
@@ -75,6 +75,13 @@ sub ask_authentication() {
sub ask_users() {
my $users = [];
any::ask_users($in, $users, $security, []);
+ my $old_user = $conf{USER_RENAME_FROM};
+ if (@$users && $old_user) {
+ $users->[0]{rename_from} = $old_user;
+ $users->[0]{home} ||= '/home/' . $users->[0]{name};
+ my $autologin = any::get_autologin();
+ $autologin->{autologin} eq $old_user and any::set_autologin($users->[0]{name}, $autologin->{desktop});
+ }
any::add_users($users, $authentication);
}