summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_interactive.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r--perl-install/install_steps_interactive.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index e4bb09f97..b2b42036c 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -451,7 +451,9 @@ sub addUser($) {
{val => \$u->{shell}, list => \@shells, not_edit => !$::expert},
],
focus_out => sub {
- $u->{name} = lc first($u->{realname} =~ /(\w+)/) if $_[0] eq 0;
+ if ($_[0] eq 0) {
+ $u->{name} = lc first($u->{realname} =~ /((\w|-)+)/);
+ }
},
complete => sub {
$u->{password} eq $u->{password2} or $o->ask_warn('', [ _("You must enter the same password"), _("Please try again") ]), return (1,3);