From: Robin McCorkell Date: Mon, 27 Nov 2017 16:46:22 +0000 (+0000) Subject: testing: Override user environment PATH in chroot X-Git-Tag: 5.6.2dr4~11^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=82b91e113aa399efa020985c2f032fbf19ccfdaa;p=thirdparty%2Fstrongswan.git testing: Override user environment PATH in chroot chroot will capture the user environment's PATH variable, which may be wrong (e.g. not include /bin:/sbin, as it is on Arch). We should set a known-working PATH variable in the chroot. --- diff --git a/testing/scripts/function.sh b/testing/scripts/function.sh index 9a32c44ab6..c512b8add6 100755 --- a/testing/scripts/function.sh +++ b/testing/scripts/function.sh @@ -50,7 +50,7 @@ execute() # $1 - command to execute execute_chroot() { - execute "chroot $LOOPDIR $@" + execute "chroot $LOOPDIR env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin $@" } # write green status message to console