diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index c8102b460..9338c8114 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -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 $_; } diff --git a/xCAT-server/lib/perl/xCAT/ADUtils.pm b/xCAT-server/lib/perl/xCAT/ADUtils.pm index 957a2ef10..5cfcc8fd1 100644 --- a/xCAT-server/lib/perl/xCAT/ADUtils.pm +++ b/xCAT-server/lib/perl/xCAT/ADUtils.pm @@ -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;