diff --git a/xCAT-client/bin/xcatDBcmds b/xCAT-client/bin/xcatDBcmds index 4020db879..81c51191d 100755 --- a/xCAT-client/bin/xcatDBcmds +++ b/xCAT-client/bin/xcatDBcmds @@ -10,7 +10,7 @@ use Cwd; use File::Basename; use xCAT::MsgUtils; use xCAT::Client; - +use strict; use Getopt::Std; my $bname = basename($0); @@ -56,6 +56,7 @@ $cmdref->{cwd}->[0] = cwd(); my $data; if ( (($^O =~ /^linux/i) && ($ENV{'SHELL'} =~ /\/ksh$/)) || !defined($ENV{'TERM'}) ) { + my $rout; my $rin=""; vec($rin,fileno(STDIN),1)=1; my $nfound=select($rout=$rin,"","",1); diff --git a/xCAT-client/bin/xcatclient b/xCAT-client/bin/xcatclient index 3f5c3c0ac..876dfd751 100755 --- a/xCAT-client/bin/xcatclient +++ b/xCAT-client/bin/xcatclient @@ -16,19 +16,20 @@ use Cwd; use File::Basename; #use Data::Dumper; use xCAT::Client; - +use strict; my $bname = basename($0); my $cmdref; if ($bname =~ /xcatclient/) { $cmdref->{command}->[0]=shift @ARGV; } # xcatclient was invoked directly and the 1st arg is cmd name that is used to locate the plugin else { $cmdref->{command}->[0] = $bname; } # the cmd was sym linked to xcatclient $cmdref->{cwd}->[0] = cwd(); - +my $data; # allows our plugins to get the stdin of the cmd that invoked the plugin if ( (($^O =~ /^linux/i) && ($ENV{'SHELL'} =~ /\/ksh$/)) || !defined($ENV{'TERM '}) ) { my $rin=""; + my $rout; vec($rin,fileno(STDIN),1)=1; my $nfound=select($rout=$rin,"","",1); if ($nfound) diff --git a/xCAT-client/bin/xcatclientnnr b/xCAT-client/bin/xcatclientnnr index df1165117..f369da9b7 100755 --- a/xCAT-client/bin/xcatclientnnr +++ b/xCAT-client/bin/xcatclientnnr @@ -11,15 +11,18 @@ use lib "$::XCATROOT/lib/perl"; use Cwd; use File::Basename; use xCAT::Client; +use strict; my $bname = basename($0); my $cmdref; if ($bname =~ /xcatclientnnr/) { $cmdref->{command}->[0]=shift @ARGV; } # xcatclientnnr was invoked directly and the 1st arg is cmd name that is used to locate the plugin else { $cmdref->{command}->[0] = $bname; } # the cmd was sym linked to xcatclientnnr $cmdref->{cwd}->[0] = cwd(); +my $data; # allows our plugins to get the stdin of the cmd that invoked the plugin if ( (($^O =~ /^linux/i) && ($ENV{'SHELL'} =~ /\/ksh$/)) || !defined($ENV{'TERM'}) ) { + my $rout; my $rin=""; vec($rin,fileno(STDIN),1)=1; my $nfound=select($rout=$rin,"","",1);