summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/finish-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2006-02-23 09:36:24 +0000
committerOlivier Blin <oblin@mandriva.org>2006-02-23 09:36:24 +0000
commit92b63febdc5244af0cfc2c199b1446c8a6a1b4e9 (patch)
treeb83eab92af7f762445570344ef8be7e128b0619e /perl-install/standalone/finish-install
parent8e854d5c2ed9dc6297598f064450beb8cd99da5f (diff)
downloaddrakx-92b63febdc5244af0cfc2c199b1446c8a6a1b4e9.tar
drakx-92b63febdc5244af0cfc2c199b1446c8a6a1b4e9.tar.gz
drakx-92b63febdc5244af0cfc2c199b1446c8a6a1b4e9.tar.bz2
drakx-92b63febdc5244af0cfc2c199b1446c8a6a1b4e9.tar.xz
drakx-92b63febdc5244af0cfc2c199b1446c8a6a1b4e9.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
Diffstat (limited to 'perl-install/standalone/finish-install')
-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);
}