From 5213751af66733ef9a2c1aa948bff6b8911f566f Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 21 Jun 2017 15:11:29 -0700 Subject: [PATCH] Set PATH when running configure mirror script The configure mirror script is trying to run utilities like ip and restorecon which at least on some distros are hidden away in /usr/sbin and not where nodepool would find them otherwise. Explicitly add /sbin, /usr/sbin, /bin, /usr/bin, and /usr/local/bin to the end of PATH to list all of the various places we might find things. With this in place we should be able to find ip and restorecon whereever they are. Change-Id: I800cd69e47b4b099b453e47f1b579ab015ed628f --- nodepool/scripts/configure_mirror.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nodepool/scripts/configure_mirror.sh b/nodepool/scripts/configure_mirror.sh index c42efb47ad..8e7036571d 100755 --- a/nodepool/scripts/configure_mirror.sh +++ b/nodepool/scripts/configure_mirror.sh @@ -16,6 +16,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# We need to ensure that we can find utilities like ip and restorecon +# which at least on some distros live in /usr/sbin. +export PATH="$PATH:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin" + if [ -f /etc/dib-builddate.txt ]; then echo "Image build date" echo "================"