summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-20 17:47:29 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-20 17:47:29 +0000
commitab29f587e9e3d270978de356c19d569d4ef6987d (patch)
tree7290193dac5fe6a3c2bc348cb420c283efa593a9
parent125b6030759c35055adf176c43bd16873506ddc4 (diff)
downloaddrakx-ab29f587e9e3d270978de356c19d569d4ef6987d.tar
drakx-ab29f587e9e3d270978de356c19d569d4ef6987d.tar.gz
drakx-ab29f587e9e3d270978de356c19d569d4ef6987d.tar.bz2
drakx-ab29f587e9e3d270978de356c19d569d4ef6987d.tar.xz
drakx-ab29f587e9e3d270978de356c19d569d4ef6987d.zip
replace home path in user config files when renaming a user (#30380)
-rw-r--r--perl-install/NEWS1
-rwxr-xr-xperl-install/standalone/finish-install6
2 files changed, 7 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index a000794c6..460d4535b 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -7,6 +7,7 @@
cancel is clicked (clean wizard window instead)
- finish-install:
o allow to ask both root and user accounts in the same step
+ o replace home path in user config files when renaming a user (#30380)
Version 10.17 - 20 March 2008
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() {