diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-20 17:47:29 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-20 17:47:29 +0000 |
commit | ab29f587e9e3d270978de356c19d569d4ef6987d (patch) | |
tree | 7290193dac5fe6a3c2bc348cb420c283efa593a9 /perl-install/standalone/finish-install | |
parent | 125b6030759c35055adf176c43bd16873506ddc4 (diff) | |
download | drakx-backup-do-not-use-ab29f587e9e3d270978de356c19d569d4ef6987d.tar drakx-backup-do-not-use-ab29f587e9e3d270978de356c19d569d4ef6987d.tar.gz drakx-backup-do-not-use-ab29f587e9e3d270978de356c19d569d4ef6987d.tar.bz2 drakx-backup-do-not-use-ab29f587e9e3d270978de356c19d569d4ef6987d.tar.xz drakx-backup-do-not-use-ab29f587e9e3d270978de356c19d569d4ef6987d.zip |
replace home path in user config files when renaming a user (#30380)
Diffstat (limited to 'perl-install/standalone/finish-install')
-rwxr-xr-x | perl-install/standalone/finish-install | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/perl-install/standalone/finish-install b/perl-install/standalone/finish-install index b4c11cb62..4618ab2aa 100755 --- a/perl-install/standalone/finish-install +++ b/perl-install/standalone/finish-install @@ -118,6 +118,12 @@ sub ask_users() { any::add_users($users, $authentication); any::set_autologin($in->do_pkgs, $users->[0]{name}, $autologin_first) if $autologin_first; + if ($old_user) { + #- replace home path in user config files + my $old_home = "/home/$old_user"; + my $new_home = "/home/$users->[0]{name}"; + run_program::run("grep -rl $old_home $new_home/.??* | while read f; do perl -pi -e 's,$old_home,$new_home,g' \"\$f\"; done"); + } } sub ask_glx() { |