Browse Source

create_user.pl - fixed shell enum for STDIN use case

master
gashapwn 3 years ago
parent
commit
00e09fd15e
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      perl-script/create_user.pl

+ 2
- 1
perl-script/create_user.pl View File

@@ -66,7 +66,7 @@ sub create($){
$s0 = $_[0] ? <IN0> : "SHELL_KSH"; $s0 = $_[0] ? <IN0> : "SHELL_KSH";
chomp $s0; chomp $s0;
unless($SHELL_ENUM->{$s0}){ unless($SHELL_ENUM->{$s0}){
die "invalid shell setting $s0 in file $id.ident";
die "invalid shell setting $s0";
} }
$shell_pref = $SHELL_ENUM->{$s0}; $shell_pref = $SHELL_ENUM->{$s0};
} }
@@ -112,6 +112,7 @@ if(`pwd` =~ /perl-script\/?\s*$/){
$ul_path = $working_dir."user_list.txt"; $ul_path = $working_dir."user_list.txt";
printf("%s\n", $conf_path); printf("%s\n", $conf_path);
}elsif(!(join(" ", glob("./*")) =~ /perl-script/)){ }elsif(!(join(" ", glob("./*")) =~ /perl-script/)){
$SHELL_ENUM = {"SHELL_KSH" => "/bin/ksh"};
create(0); create(0);
die "done...\n"; die "done...\n";
} }


Loading…
Cancel
Save