From 13aab25d3da100b494d61548654f29b1999d33ec Mon Sep 17 00:00:00 2001 From: Dirk Mueller <dirk@dmllr.de> Date: Mon, 18 Mar 2013 18:55:09 +0100 Subject: [PATCH] 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 --- lib/quantum | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/quantum b/lib/quantum index 862ba8486d..2ef883a544 100644 --- a/lib/quantum +++ b/lib/quantum @@ -569,7 +569,12 @@ function _quantum_setup_rootwrap() { sudo chown -R root:root $Q_CONF_ROOTWRAP_D sudo chmod 644 $Q_CONF_ROOTWRAP_D/* # Set up rootwrap.conf, pointing to $QUANTUM_CONF_DIR/rootwrap.d - sudo cp -p $QUANTUM_DIR/etc/rootwrap.conf $Q_RR_CONF_FILE + # location moved in newer versions, prefer new location + if test -r $QUANTUM_DIR/etc/quantum/rootwrap.conf; then + sudo cp -p $QUANTUM_DIR/etc/quantum/rootwrap.conf $Q_RR_CONF_FILE + else + sudo cp -p $QUANTUM_DIR/etc/rootwrap.conf $Q_RR_CONF_FILE + fi sudo sed -e "s:^filters_path=.*$:filters_path=$Q_CONF_ROOTWRAP_D:" -i $Q_RR_CONF_FILE sudo chown root:root $Q_RR_CONF_FILE sudo chmod 0644 $Q_RR_CONF_FILE