Browse code

Accept Quantums rootwrap.conf in etc/quantum/rootwrap.conf

As part of the review request
https://review.openstack.org/#/c/24615/
the Quantum rootwrap.conf is moving to etc/quantum subdir.
Prefer the new location.

Change-Id: I2a893c7b21e252543372854ba511f61cd1fde02f

Dirk Mueller authored on 2013/03/19 02:55:09
Showing 1 changed files
... ...
@@ -569,7 +569,12 @@ function _quantum_setup_rootwrap() {
569 569
     sudo chown -R root:root $Q_CONF_ROOTWRAP_D
570 570
     sudo chmod 644 $Q_CONF_ROOTWRAP_D/*
571 571
     # Set up rootwrap.conf, pointing to $QUANTUM_CONF_DIR/rootwrap.d
572
-    sudo cp -p $QUANTUM_DIR/etc/rootwrap.conf $Q_RR_CONF_FILE
572
+    # location moved in newer versions, prefer new location
573
+    if test -r $QUANTUM_DIR/etc/quantum/rootwrap.conf; then
574
+      sudo cp -p $QUANTUM_DIR/etc/quantum/rootwrap.conf $Q_RR_CONF_FILE
575
+    else
576
+      sudo cp -p $QUANTUM_DIR/etc/rootwrap.conf $Q_RR_CONF_FILE
577
+    fi
573 578
     sudo sed -e "s:^filters_path=.*$:filters_path=$Q_CONF_ROOTWRAP_D:" -i $Q_RR_CONF_FILE
574 579
     sudo chown root:root $Q_RR_CONF_FILE
575 580
     sudo chmod 0644 $Q_RR_CONF_FILE