- cmd = "ipmitool -I lanplus -H %s -U %s -P '%s' user list "
- (i,p) = os.popen4(cmd % ( self.host, self.username, self.password) )
- result = p.read()
- print "RESULT: ", result
+ ipmi_cmd = "user list"
+
+ cmd = "ipmitool -I lanplus -H %s -U %s -P '%s' %s"
+ cmd = cmd % ( self.host, self.username, self.password, ipmi_cmd )
+ p = subprocess.Popen(cmd, shell=True,
+ stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT, close_fds=True)
+ (i,p) = (p.stdin, p.stdout)
+ result = p.read()
+ #print "RESULT: ", result