diff options
author | Olivier Blin <oblin@mandriva.org> | 2006-02-23 09:36:24 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2006-02-23 09:36:24 +0000 |
commit | 92b63febdc5244af0cfc2c199b1446c8a6a1b4e9 (patch) | |
tree | b83eab92af7f762445570344ef8be7e128b0619e /perl-install/standalone | |
parent | 8e854d5c2ed9dc6297598f064450beb8cd99da5f (diff) | |
download | drakx-backup-do-not-use-92b63febdc5244af0cfc2c199b1446c8a6a1b4e9.tar drakx-backup-do-not-use-92b63febdc5244af0cfc2c199b1446c8a6a1b4e9.tar.gz drakx-backup-do-not-use-92b63febdc5244af0cfc2c199b1446c8a6a1b4e9.tar.bz2 drakx-backup-do-not-use-92b63febdc5244af0cfc2c199b1446c8a6a1b4e9.tar.xz drakx-backup-do-not-use-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')
-rwxr-xr-x | perl-install/standalone/finish-install | 7 |
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); } |