# HG changeset patch # User Eris Caffee # Date 1311013465 18000 # Node ID 807d649f3bc9a1bc576fd42681b14de24fd68479 # Parent 542b1fb6759ddff6f0c23abc8505caa04e861dc3 Tinker, tinker, nothing major. diff -r 542b1fb6759d -r 807d649f3bc9 make-username.pl --- a/make-username.pl Mon Jul 18 13:08:21 2011 -0500 +++ b/make-username.pl Mon Jul 18 13:24:25 2011 -0500 @@ -135,18 +135,16 @@ $base = "user"; } - ! defined $pwdfile and $pwdfile = "/etc/passwd"; - if (! defined $maxlen) { $maxlen = 8; - } else { - if ($maxlen !~ /^\d+$/) { + } elsif ($maxlen !~ /^\d+$/) { printf(STDERR "Error: non-numeric username length specified.\n"); return undef; - } } - if (! -e $pwdfile) { + if (! defined $pwdfile) { + $pwdfile = "/etc/passwd"; + } elsif (! -e $pwdfile) { printf(STDERR "Error: non-existant passwd file specified: $pwdfile\n"); return undef; }