aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2018-09-28 10:38:16 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2018-09-28 10:38:16 +0200
commit43a5cd64c9971da6d06436c8739387aac6496d1b (patch)
treedf998a8efb42e2bed1ba163ae90c2093cb75f648
parent2e8b30d82fd9c2877d6ee1330fdf59463a1a9a1a (diff)
downloaduserdrake-43a5cd64c9971da6d06436c8739387aac6496d1b.tar
userdrake-43a5cd64c9971da6d06436c8739387aac6496d1b.tar.gz
userdrake-43a5cd64c9971da6d06436c8739387aac6496d1b.tar.bz2
userdrake-43a5cd64c9971da6d06436c8739387aac6496d1b.tar.xz
userdrake-43a5cd64c9971da6d06436c8739387aac6496d1b.zip
perl_checker cleanups
-rwxr-xr-xuserdrake4
1 files changed, 2 insertions, 2 deletions
diff --git a/userdrake b/userdrake
index 5bf5027..8a31650 100755
--- a/userdrake
+++ b/userdrake
@@ -321,7 +321,7 @@ sub get_params {
my @lines = <$fh>;
close $fh;
my $param_list = join('|', @parameters);
- my %params = map { /^($param_list)\b(?:=|\s+)(.+)$/; $1 => $2 } grep {/^(?:$param_list)\b/} @lines;
+ my %params = map { /^($param_list)\b(?:=|\s+)(.+)$/; $1 => $2 } grep { /^(?:$param_list)\b/ } @lines;
return \%params;
}
return {};
@@ -585,7 +585,7 @@ sub AddUser() {
$userEnt->Gid($u{gid});
$userEnt->ShadowMin(-1); $userEnt->ShadowMax(99999);
$userEnt->ShadowWarn(-1); $userEnt->ShadowInact(-1);
- if ((-e $u{homedir}) && (-d $u{homedir})) {
+ if (-e $u{homedir} && -d $u{homedir}) {
my $keephomedir = $in->ask_yesorno(N("Home directory already exists"), N("The requested home directory already exists. Would you like to preserve the existing directory?"));
return if !$keephomedir;
}