]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cstart.sh: work with docker or podman 34328/head
authorSage Weil <sage@redhat.com>
Fri, 17 Apr 2020 22:05:26 +0000 (18:05 -0400)
committerSage Weil <sage@redhat.com>
Fri, 17 Apr 2020 22:05:44 +0000 (18:05 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/cstart.sh

index 5baf85f8868237731850113aa2df2507528f60cb..1c243b96e694754ce855cbaffed6397901a43e1d 100755 (executable)
@@ -2,6 +2,12 @@
 
 image_base="quay.io/ceph-ci/ceph"
 
+if which podman 2>&1 > /dev/null; then
+    runtime="podman"
+else
+    runtime="docker"
+fi
+
 # fsid
 if [ -e fsid ] ; then
     fsid=`cat fsid`
@@ -39,7 +45,7 @@ fi
 echo "port $port"
 
 # make sure we have an image
-if ! podman image inspect $image_base:$shortid 2>/dev/null; then
+if ! $runtime image inspect $image_base:$shortid 2>/dev/null; then
     echo "building initial $image_base:$shortid image..."
     sudo ../src/script/cpatch -t $image_base:$shortid
 fi