mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
restore xcattest back to original before bash dash problem
This commit is contained in:
parent
7238c7391b
commit
c03bfae920
@ -22,12 +22,6 @@ my $needshow = 0;
|
||||
my $restore = 0;
|
||||
my $ret = 0;
|
||||
my $string1 = undef;
|
||||
|
||||
my $isubuntu=0;
|
||||
my $output=`cat /etc/lsb-release 2>&1 |grep -i Ubuntu| wc -l`;
|
||||
chomp($output);
|
||||
$isubuntu=1 if($output > 0);
|
||||
|
||||
if (
|
||||
!GetOptions("h|?" => \$needhelp,
|
||||
"f=s" => \$configfile,
|
||||
@ -888,14 +882,7 @@ sub runcmd
|
||||
my $rc = 0;
|
||||
$::RUNCMD_RC = 0;
|
||||
my $outref = [];
|
||||
|
||||
if($isubuntu){
|
||||
$cmd=~s/(")/\\\1/g;
|
||||
$cmd=~s/(`)/\\\1/g;
|
||||
@$outref = `/bin/bash -lic "$cmd 2>&1"`;
|
||||
}else{
|
||||
@$outref = `$cmd 2>&1`;
|
||||
}
|
||||
@$outref = `$cmd 2>&1`;
|
||||
if ($?)
|
||||
{
|
||||
$rc = $? ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user