Created template for server process subcommands

This commit is contained in:
Gregory Kurtzer
2020-12-10 20:57:32 -08:00
parent a5e79ae560
commit c53c97dbcf
12 changed files with 122 additions and 17 deletions

View File

@@ -7,17 +7,16 @@ import (
var (
baseCmd = &cobra.Command{
Use: "warewulfd",
Short: "Warewulf Daemon Service",
Long: "This is the primary Warewulf service for provisioning nodes",
RunE: CobraRunE,
PersistentPreRunE: rootPersistentPreRunE,
Use: "warewulfd",
Short: "Warewulf Daemon Service",
Long: "This is the primary Warewulf system for provisioning nodes",
RunE: CobraRunE,
PersistentPreRunE: rootPersistentPreRunE,
}
verboseArg bool
debugArg bool
debugArg bool
)
func init() {
baseCmd.PersistentFlags().BoolVarP(&verboseArg, "verbose", "v", false, "Run with increased verbosity.")
baseCmd.PersistentFlags().BoolVarP(&debugArg, "debug", "d", false, "Run with debugging messages enabled.")
@@ -37,4 +36,4 @@ func rootPersistentPreRunE(cmd *cobra.Command, args []string) error {
wwlog.SetLevel(wwlog.INFO)
}
return nil
}
}