Files
warewulf/internal/app/wwctl/upgrade/cobra.go
Jonathon Anderson a80ba8ee01 Configure nodes.conf path dynamically from config
Removes the use of init() to initialize the variable.

- Closes: #1596
- See also: #1569

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-17 11:04:43 -07:00

22 lines
631 B
Go

package upgrade
import (
"github.com/spf13/cobra"
"github.com/warewulf/warewulf/internal/app/wwctl/upgrade/config"
"github.com/warewulf/warewulf/internal/app/wwctl/upgrade/nodes"
)
func GetCommand() *cobra.Command {
command := &cobra.Command{
DisableFlagsInUseLine: true,
Use: "upgrade <config|nodes> [OPTIONS]",
Short: "Upgrade configuration files",
Long: `Upgrade warewulf.conf or nodes.conf from a previous version of Warewulf 4 to a format
supported by the current version.`,
}
command.AddCommand(config.GetCommand())
command.AddCommand(nodes.GetCommand())
return command
}