]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
prscript: docker do not need sudo
authorEric Leblond <eric@regit.org>
Thu, 22 Oct 2015 19:06:44 +0000 (21:06 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 17 Nov 2015 13:07:34 +0000 (14:07 +0100)
Usage is not to run docker command as root but to have the user
in the docker group to be able to run docker commands.

qa/prscript.py

index 4f401edde44b623aba6f938caa72b23895654c12..f67d94cc44a29fde99406f7d1885807a701c58b5 100755 (executable)
@@ -227,9 +227,6 @@ if not args.local and TestRepoSync(args.branch) == -1:
         sys.exit(-1)
 
 def CreateContainer():
-    if not os.geteuid() == 0:
-        print "Command must be run as root"
-        sys.exit(-1)
     cli = Client()
     # FIXME check if existing
     print "Pulling docking image, first run should take long"
@@ -238,9 +235,6 @@ def CreateContainer():
     sys.exit(0)
 
 def StartContainer():
-    if not os.geteuid() == 0:
-        print "Command must be run as root"
-        sys.exit(-1)
     cli = Client()
     suri_src_dir = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]
     print "Using base src dir: " + suri_src_dir
@@ -248,9 +242,6 @@ def StartContainer():
     sys.exit(0)
 
 def StopContainer():
-    if not os.geteuid() == 0:
-        print "Command must be run as root"
-        sys.exit(-1)
     cli = Client()
     cli.stop('suri-buildbot')
     sys.exit(0)