summaryrefslogtreecommitdiff
path: root/cmd/podman/main_remote.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-04-11 01:06:56 -0700
committerGitHub <noreply@github.com>2019-04-11 01:06:56 -0700
commitf9ae2d48309f0d51644f0a7da8ab4b6845a9db56 (patch)
treeece54853a51393f4a6db8765808d6683c1b02a20 /cmd/podman/main_remote.go
parent6cd6eb6768bb936e87309c61d9cf131350274700 (diff)
parent7f10672486086c5a7a123bfa0d3edb23fa5b1c9f (diff)
downloadpodman-f9ae2d48309f0d51644f0a7da8ab4b6845a9db56.tar.gz
podman-f9ae2d48309f0d51644f0a7da8ab4b6845a9db56.tar.bz2
podman-f9ae2d48309f0d51644f0a7da8ab4b6845a9db56.zip
Merge pull request #2883 from baude/remoteclifixes
Initial remote flag clean up
Diffstat (limited to 'cmd/podman/main_remote.go')
-rw-r--r--cmd/podman/main_remote.go43
1 files changed, 43 insertions, 0 deletions
diff --git a/cmd/podman/main_remote.go b/cmd/podman/main_remote.go
new file mode 100644
index 000000000..2a7d184cd
--- /dev/null
+++ b/cmd/podman/main_remote.go
@@ -0,0 +1,43 @@
+// +build remoteclient
+
+package main
+
+import (
+ "os"
+
+ "github.com/containers/libpod/pkg/rootless"
+ "github.com/sirupsen/logrus"
+ "github.com/spf13/cobra"
+)
+
+const remote = true
+
+func init() {
+ // remote client specific flags can go here.
+}
+
+func setSyslog() error {
+ return nil
+}
+
+func profileOn(cmd *cobra.Command) error {
+ return nil
+}
+
+func profileOff(cmd *cobra.Command) error {
+ return nil
+}
+
+func setupRootless(cmd *cobra.Command, args []string) error {
+ if rootless.IsRootless() {
+ became, ret, err := rootless.BecomeRootInUserNS()
+ if err != nil {
+ logrus.Errorf(err.Error())
+ os.Exit(1)
+ }
+ if became {
+ os.Exit(ret)
+ }
+ }
+ return nil
+}