summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/finish-install
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2022-11-12 21:52:39 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2022-11-12 21:52:39 +0000
commit4ed92dabed418bb12f76bb317716614241dc6eee (patch)
tree8ba476661dbc4ff14abfbefb1f3a037710560dee /perl-install/standalone/finish-install
parent31c560002bfea94b8c68fb7e38fe79a947b42bcd (diff)
downloaddrakx-4ed92dabed418bb12f76bb317716614241dc6eee.tar
drakx-4ed92dabed418bb12f76bb317716614241dc6eee.tar.gz
drakx-4ed92dabed418bb12f76bb317716614241dc6eee.tar.bz2
drakx-4ed92dabed418bb12f76bb317716614241dc6eee.tar.xz
drakx-4ed92dabed418bb12f76bb317716614241dc6eee.zip
Refactor ready for next commit.
Diffstat (limited to 'perl-install/standalone/finish-install')
-rwxr-xr-xperl-install/standalone/finish-install5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/standalone/finish-install b/perl-install/standalone/finish-install
index 16de321ea..72767a9b2 100755
--- a/perl-install/standalone/finish-install
+++ b/perl-install/standalone/finish-install
@@ -173,13 +173,14 @@ sub ask_users() {
$_ .= "user $users->[0]{name}\n" if eof;
} $finit_conf if -e $finit_conf;
if ($old_user) {
+ my $new_user = $users->[0]{name};
#- replace home path in user config files
my $old_home = "/home/$old_user";
- my $new_home = "/home/$users->[0]{name}";
+ my $new_home = "/home/$new_user";
run_program::run(qq(grep -D skip -rl $old_home $new_home/.??* | while read f; do perl -pi -e 's,$old_home,$new_home,g' "\$f"; done));
#- give console rights for current session
my $console_dir = "/var/run/console";
- cp_f($console_dir . "/" . $old_user, $console_dir . "/" . $users->[0]{name}) if -e $console_dir . "/" . $old_user;
+ cp_f($console_dir . "/" . $old_user, $console_dir . "/" . $new_user) if -e $console_dir . "/" . $old_user;
}
}