Merge "Append full path to img-functions:run_in_target"
This commit is contained in:
commit
f0736e7d97
@ -56,11 +56,11 @@ function ensure_sudo () {
|
||||
|
||||
# Helper function to run a command inside the chroot
|
||||
function run_in_target () {
|
||||
# Force the inclusion of /usr/local/bin in PATH, this is needed for some
|
||||
# distros that does not include /usr/local/bin in the sudoers secure_path.
|
||||
# Force the inclusion of a typical set of dirs in PATH, this is needed for guest
|
||||
# distros that have path elements not in the host PATH.
|
||||
# Note that we're not expanding PATH during argument processing, the \$
|
||||
# will preserve the PATH syntax until after the sh command runs
|
||||
cmd="PATH=\$PATH:/usr/local/bin ; $@"
|
||||
cmd="PATH=\$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ; $@"
|
||||
# -E to preserve http_proxy
|
||||
ORIG_HOME=$HOME
|
||||
export HOME=/root
|
||||
|
Loading…
Reference in New Issue
Block a user