-Correct filehandles in runcmd3

-Adjust for 8 bitshift exitcode correction in runcmd3


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6159 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2010-05-18 19:54:43 +00:00
parent 18f4bfafe9
commit 3415fbd8f9
2 changed files with 3 additions and 3 deletions

View File

@ -899,7 +899,7 @@ sub runcmd3 { #a proper runcmd that indpendently returns stdout, stderr, pid and
my $cmdout;
my $cmderr = gensym;
my $cmdpid = open3($cmdin,$cmdout,$cmderr,@cmd);
my $cmdsel = IO::Select->new($cmdout,$cmdin);
my $cmdsel = IO::Select->new($cmdout,$cmderr);
foreach (@indata) {
print $cmdin $_;
}

View File

@ -460,7 +460,7 @@ sub add_user_account {
my $rc = $retdata->{exitcode};
if ($rc == 0) {
return {error=>"User already exists"};
} elsif (not $rc==8192) {
} elsif (not $rc==32) {
return {error=>"Unknown error $rc:".$retdata->{errors}};
}
$retdata = runcmd3(input=>$ldif,command=>["ldapmodify","-H","ldaps://$directoryserver"]);
@ -520,7 +520,7 @@ sub add_host_account {
} else {
return {error=>"System already exists"};
}
} elsif (not $rc==8192) {
} elsif (not $rc==32) {
return {error=>"Unknown error $rc: ".$retdata->{errors}};
} else {
$ldif = $machineldiftemplate;