diff options
Diffstat (limited to 'cmd/podman/machine/init.go')
-rw-r--r-- | cmd/podman/machine/init.go | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/cmd/podman/machine/init.go b/cmd/podman/machine/init.go index 06c1f7248..4991c6aa3 100644 --- a/cmd/podman/machine/init.go +++ b/cmd/podman/machine/init.go @@ -12,7 +12,6 @@ import ( "github.com/containers/podman/v4/pkg/machine" "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/spf13/pflag" ) var ( @@ -107,18 +106,8 @@ func init() { flags.StringVar(&initOpts.IgnitionPath, IgnitionPathFlagName, "", "Path to ignition file") _ = initCmd.RegisterFlagCompletionFunc(IgnitionPathFlagName, completion.AutocompleteDefault) - rootfullFlagName := "rootfull" - flags.BoolVar(&initOpts.Rootfull, rootfullFlagName, false, "Whether this machine should prefer rootfull container execution") - flags.SetNormalizeFunc(aliasFlags) -} - -// aliasFlags is a function to handle backwards compatibility with old flags -func aliasFlags(f *pflag.FlagSet, name string) pflag.NormalizedName { - switch name { - case "rootful": - name = "rootfull" - } - return pflag.NormalizedName(name) + rootfulFlagName := "rootful" + flags.BoolVar(&initOpts.Rootful, rootfulFlagName, false, "Whether this machine should prefer rootful container execution") } // TODO should we allow for a users to append to the qemu cmdline? @@ -146,7 +135,6 @@ func initMachine(cmd *cobra.Command, args []string) error { if err != nil { return err } - if finished, err := vm.Init(initOpts); err != nil || !finished { // Finished = true, err = nil - Success! Log a message with further instructions // Finished = false, err = nil - The installation is partially complete and podman should @@ -155,7 +143,6 @@ func initMachine(cmd *cobra.Command, args []string) error { // - a user has chosen to perform their own reboot // - reexec for limited admin operations, returning to parent // Finished = *, err != nil - Exit with an error message - return err } fmt.Println("Machine init complete") |