summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/generate/systemd.go12
-rw-r--r--cmd/podman/machine/start.go2
-rw-r--r--cmd/podman/registry/config.go15
3 files changed, 24 insertions, 5 deletions
diff --git a/cmd/podman/generate/systemd.go b/cmd/podman/generate/systemd.go
index 5ad42ebc0..0dab6299d 100644
--- a/cmd/podman/generate/systemd.go
+++ b/cmd/podman/generate/systemd.go
@@ -25,6 +25,9 @@ const (
restartPolicyFlagName = "restart-policy"
restartSecFlagName = "restart-sec"
newFlagName = "new"
+ wantsFlagName = "wants"
+ afterFlagName = "after"
+ requiresFlagName = "requires"
)
var (
@@ -97,6 +100,15 @@ func init() {
flags.StringVar(&format, formatFlagName, "", "Print the created units in specified format (json)")
_ = systemdCmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(nil))
+ flags.StringArrayVar(&systemdOptions.Wants, wantsFlagName, nil, "Add (weak) requirement dependencies to the generated unit file")
+ _ = systemdCmd.RegisterFlagCompletionFunc(wantsFlagName, completion.AutocompleteNone)
+
+ flags.StringArrayVar(&systemdOptions.After, afterFlagName, nil, "Add dependencies order to the generated unit file")
+ _ = systemdCmd.RegisterFlagCompletionFunc(afterFlagName, completion.AutocompleteNone)
+
+ flags.StringArrayVar(&systemdOptions.Requires, requiresFlagName, nil, "Similar to wants, but declares stronger requirement dependencies")
+ _ = systemdCmd.RegisterFlagCompletionFunc(requiresFlagName, completion.AutocompleteNone)
+
flags.SetNormalizeFunc(utils.TimeoutAliasFlags)
}
diff --git a/cmd/podman/machine/start.go b/cmd/podman/machine/start.go
index 0bcf32cd5..16faa25ef 100644
--- a/cmd/podman/machine/start.go
+++ b/cmd/podman/machine/start.go
@@ -1,3 +1,4 @@
+//go:build amd64 || arm64
// +build amd64 arm64
package machine
@@ -64,5 +65,6 @@ func start(cmd *cobra.Command, args []string) error {
if err := vm.Start(vmName, machine.StartOptions{}); err != nil {
return err
}
+ fmt.Printf("Machine %q started successfully\n", vmName)
return nil
}
diff --git a/cmd/podman/registry/config.go b/cmd/podman/registry/config.go
index f5822d33e..15bb7aee0 100644
--- a/cmd/podman/registry/config.go
+++ b/cmd/podman/registry/config.go
@@ -52,6 +52,12 @@ func newPodmanConfig() {
os.Exit(1)
}
+ cfg, err := config.NewConfig("")
+ if err != nil {
+ fmt.Fprint(os.Stderr, "Failed to obtain podman configuration: "+err.Error())
+ os.Exit(1)
+ }
+
var mode entities.EngineMode
switch runtime.GOOS {
case "darwin", "windows":
@@ -64,16 +70,15 @@ func newPodmanConfig() {
} else {
mode = entities.TunnelMode
}
-
default:
fmt.Fprintf(os.Stderr, "%s is not a supported OS", runtime.GOOS)
os.Exit(1)
}
- cfg, err := config.NewConfig("")
- if err != nil {
- fmt.Fprint(os.Stderr, "Failed to obtain podman configuration: "+err.Error())
- os.Exit(1)
+ // If EngineMode==Tunnel has not been set on the command line or environment
+ // but has been set in containers.conf...
+ if mode == entities.ABIMode && cfg.Engine.Remote {
+ mode = entities.TunnelMode
}
cfg.Network.NetworkConfigDir = cfg.Network.CNIPluginDirs[0]