added configureable ipmiinterface used by ipmitool

ipmitool is now searched from $PATH, so that self
compiled ipmitool can be used
This commit is contained in:
Christian Goll
2021-08-03 11:30:26 +02:00
parent 535563150c
commit c6b2fc5795
14 changed files with 91 additions and 42 deletions

View File

@@ -48,12 +48,16 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
wwlog.Printf(wwlog.ERROR, "%s: No IPMI IP address\n", node.Id.Get())
continue
}
var ipmiInterface = "lan"
if node.IpmiInterface.Get() != "" {
ipmiInterface = node.IpmiInterface.Get()
}
ipmiCmd := power.IPMI{
NodeName: node.Id.Get(),
HostName: node.IpmiIpaddr.Get(),
User: node.IpmiUserName.Get(),
Password: node.IpmiPassword.Get(),
NodeName: node.Id.Get(),
HostName: node.IpmiIpaddr.Get(),
User: node.IpmiUserName.Get(),
Password: node.IpmiPassword.Get(),
Interface: ipmiInterface,
AuthType: "MD5",
}

View File

@@ -48,12 +48,16 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
wwlog.Printf(wwlog.ERROR, "%s: No IPMI IP address\n", node.Id.Get())
continue
}
var ipmiInterface = "lan"
if node.IpmiInterface.Get() != "" {
ipmiInterface = node.IpmiInterface.Get()
}
ipmiCmd := power.IPMI{
NodeName: node.Id.Get(),
HostName: node.IpmiIpaddr.Get(),
User: node.IpmiUserName.Get(),
Password: node.IpmiPassword.Get(),
NodeName: node.Id.Get(),
HostName: node.IpmiIpaddr.Get(),
User: node.IpmiUserName.Get(),
Password: node.IpmiPassword.Get(),
Interface: ipmiInterface,
AuthType: "MD5",
}

View File

@@ -48,12 +48,16 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
wwlog.Printf(wwlog.ERROR, "%s: No IPMI IP address\n", node.Id.Get())
continue
}
var ipmiInterface = "lan"
if node.IpmiInterface.Get() != "" {
ipmiInterface = node.IpmiInterface.Get()
}
ipmiCmd := power.IPMI{
NodeName: node.Id.Get(),
HostName: node.IpmiIpaddr.Get(),
User: node.IpmiUserName.Get(),
Password: node.IpmiPassword.Get(),
NodeName: node.Id.Get(),
HostName: node.IpmiIpaddr.Get(),
User: node.IpmiUserName.Get(),
Password: node.IpmiPassword.Get(),
Interface: ipmiInterface,
AuthType: "MD5",
}