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

@@ -31,6 +31,7 @@ var (
SetIpmiGateway string
SetIpmiUsername string
SetIpmiPassword string
SetIpmiInterface string
SetNodeAll bool
SetYes bool
SetProfile string
@@ -63,6 +64,7 @@ func init() {
baseCmd.PersistentFlags().StringVar(&SetIpmiGateway, "ipmigateway", "", "Set the node's IPMI gateway")
baseCmd.PersistentFlags().StringVar(&SetIpmiUsername, "ipmiuser", "", "Set the node's IPMI username")
baseCmd.PersistentFlags().StringVar(&SetIpmiPassword, "ipmipass", "", "Set the node's IPMI password")
baseCmd.PersistentFlags().StringVar(&SetIpmiInterface, "ipmiinterface", "", "Set the node's IPMI interface (defaults to lan if empty)")
baseCmd.PersistentFlags().StringSliceVar(&SetAddProfile, "addprofile", []string{}, "Add Profile(s) to node")
baseCmd.PersistentFlags().StringSliceVar(&SetDelProfile, "delprofile", []string{}, "Remove Profile(s) to node")