From 92b63febdc5244af0cfc2c199b1446c8a6a1b4e9 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 23 Feb 2006 09:36:24 +0000 Subject: 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 --- perl-install/standalone/finish-install | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'perl-install/standalone/finish-install') 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); } -- cgit v1.2.1