Browse code

Don't use --skip-redirect for cinder restart on rhel6

RHEL6 doesn't support this flag so the restart fails. Not exactly
sure why it is required, seems unchagned from the initial
commit 67787e6b4c6f31388cbee6d83b67371b31c443d4

(found running stack.sh with -e per [1])

[1] https://review.openstack.org/#/c/71996/

Change-Id: Ib34c3663409d7b96b932286cb5a6974e940075d3

Ian Wienand authored on 2014/02/26 12:52:02
Showing 1 changed files
... ...
@@ -496,8 +496,12 @@ function start_cinder() {
496 496
             sudo stop tgt || true
497 497
             sudo start tgt
498 498
         elif is_fedora; then
499
-            # bypass redirection to systemctl during restart
500
-            sudo /sbin/service --skip-redirect tgtd restart
499
+            if [[ $DISTRO =~ (rhel6) ]]; then
500
+                sudo /sbin/service tgtd restart
501
+            else
502
+                # bypass redirection to systemctl during restart
503
+                sudo /sbin/service --skip-redirect tgtd restart
504
+            fi
501 505
         elif is_suse; then
502 506
             restart_service tgtd
503 507
         else