aboutsummaryrefslogtreecommitdiff
path: root/pkg/systemd/generate/common.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-03-15 14:25:30 -0400
committerGitHub <noreply@github.com>2021-03-15 14:25:30 -0400
commite7dc59252bd722377938ac3e6b4fd7e077f05293 (patch)
tree6a51b88aa97db1ff7dfa0313876b28844764aab1 /pkg/systemd/generate/common.go
parentfc02d16e728dfdd5a5f2e3bc622bbceb7f8c0d24 (diff)
parent8de56070393ad449dc54ae622d9b82f28a6a5c52 (diff)
downloadpodman-e7dc59252bd722377938ac3e6b4fd7e077f05293.tar.gz
podman-e7dc59252bd722377938ac3e6b4fd7e077f05293.tar.bz2
podman-e7dc59252bd722377938ac3e6b4fd7e077f05293.zip
Merge pull request #9716 from Luap99/remote-libpod
Do not leak libpod package into the remote client
Diffstat (limited to 'pkg/systemd/generate/common.go')
-rw-r--r--pkg/systemd/generate/common.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/pkg/systemd/generate/common.go b/pkg/systemd/generate/common.go
index bbd1a5f92..94a6f4cb5 100644
--- a/pkg/systemd/generate/common.go
+++ b/pkg/systemd/generate/common.go
@@ -4,25 +4,18 @@ import (
"strconv"
"strings"
+ "github.com/containers/podman/v3/pkg/systemd/define"
"github.com/pkg/errors"
)
-// EnvVariable "PODMAN_SYSTEMD_UNIT" is set in all generated systemd units and
-// is set to the unit's (unique) name.
-const EnvVariable = "PODMAN_SYSTEMD_UNIT"
-
// minTimeoutStopSec is the minimal stop timeout for generated systemd units.
// Once exceeded, processes of the services are killed and the cgroup(s) are
// cleaned up.
const minTimeoutStopSec = 60
-// RestartPolicies includes all valid restart policies to be used in a unit
-// file.
-var RestartPolicies = []string{"no", "on-success", "on-failure", "on-abnormal", "on-watchdog", "on-abort", "always"}
-
// validateRestartPolicy checks that the user-provided policy is valid.
func validateRestartPolicy(restart string) error {
- for _, i := range RestartPolicies {
+ for _, i := range define.RestartPolicies {
if i == restart {
return nil
}