From 00e09fd15e3fa67ada0ae46c4f92c376776a772f Mon Sep 17 00:00:00 2001 From: gashapwn Date: Tue, 29 Dec 2020 04:11:50 +0000 Subject: [PATCH] create_user.pl - fixed shell enum for STDIN use case --- perl-script/create_user.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl-script/create_user.pl b/perl-script/create_user.pl index 509379b..e0bc7a2 100644 --- a/perl-script/create_user.pl +++ b/perl-script/create_user.pl @@ -66,7 +66,7 @@ sub create($){ $s0 = $_[0] ? : "SHELL_KSH"; chomp $s0; unless($SHELL_ENUM->{$s0}){ - die "invalid shell setting $s0 in file $id.ident"; + die "invalid shell setting $s0"; } $shell_pref = $SHELL_ENUM->{$s0}; } @@ -112,6 +112,7 @@ if(`pwd` =~ /perl-script\/?\s*$/){ $ul_path = $working_dir."user_list.txt"; printf("%s\n", $conf_path); }elsif(!(join(" ", glob("./*")) =~ /perl-script/)){ + $SHELL_ENUM = {"SHELL_KSH" => "/bin/ksh"}; create(0); die "done...\n"; }