summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/finish-install7
1 files changed, 7 insertions, 0 deletions
diff --git a/perl-install/standalone/finish-install b/perl-install/standalone/finish-install
index 72767a9b2..2c44e4f6f 100755
--- a/perl-install/standalone/finish-install
+++ b/perl-install/standalone/finish-install
@@ -181,6 +181,13 @@ sub ask_users() {
#- give console rights for current session
my $console_dir = "/var/run/console";
cp_f($console_dir . "/" . $old_user, $console_dir . "/" . $new_user) if -e $console_dir . "/" . $old_user;
+ #- update user name in network configurations
+ #- for now, only support the case of a single user name
+ foreach my $f (glob('/etc/sysconfig/network-scripts/ifcfg-*')) {
+ if (cat_($f) =~ /\nUSERS=$old_user\n/) {
+ run_program::run('perl', '-pi', '-e', "s,^USERS=$old_user,USERS=$new_user,", $f);
+ }
+ }
}
}