mirror of
https://github.com/containers/podman.git
synced 2025-05-22 09:36:57 +08:00

Drop the support for remote clients to generate systemd-service files. The generated files are machine-dependent and hence relate only to the a local machine. Furthermore, a proper service management when using a remote-client is not possible as systemd has no access to a process. Dropping the support will also reduce the risk of making users believe that the generated services are usable in a remote scenario. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
33 lines
832 B
Go
33 lines
832 B
Go
package main
|
|
|
|
import (
|
|
"github.com/containers/libpod/cmd/podman/cliconfig"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
generateCommand cliconfig.PodmanCommand
|
|
generateDescription = "Generate structured data based for a containers and pods"
|
|
_generateCommand = &cobra.Command{
|
|
Use: "generate",
|
|
Short: "Generated structured data",
|
|
Long: generateDescription,
|
|
RunE: commandRunE(),
|
|
}
|
|
|
|
// Commands that are universally implemented
|
|
generateCommands = []*cobra.Command{
|
|
_containerKubeCommand,
|
|
}
|
|
)
|
|
|
|
func init() {
|
|
// Systemd-service generation is not supported for remote-clients.
|
|
if !remoteclient {
|
|
generateCommands = append(generateCommands, _containerSystemdCommand)
|
|
}
|
|
generateCommand.Command = _generateCommand
|
|
generateCommand.AddCommand(generateCommands...)
|
|
generateCommand.SetUsageTemplate(UsageTemplate())
|
|
}
|