From b126b8aaff12fd976a98d59dd5f73d47187f83af Mon Sep 17 00:00:00 2001 From: Kron4ek Date: Mon, 29 Mar 2021 18:58:27 +0500 Subject: [PATCH] Increase the priority of user-defined PATH --- squashfs-start.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/squashfs-start.sh b/squashfs-start.sh index 1bbd017..ef4b34d 100755 --- a/squashfs-start.sh +++ b/squashfs-start.sh @@ -26,7 +26,7 @@ working_dir=/tmp/"$(basename "${script}")"_"$(id -un)"_$RANDOM # a problem with mounting the squashfs image due to an incorrectly calculated offset. # The size of this script -scriptsize=6575 +scriptsize=6699 # The size of the utils.tar archive # utils.tar contains bwrap and squashfuse binaries @@ -174,10 +174,11 @@ run_bwrap () { --ro-bind-try /etc/nsswitch.conf /etc/nsswitch.conf \ --ro-bind-try /etc/passwd /etc/passwd \ --ro-bind-try /etc/group /etc/group \ + --ro-bind-try /etc/hostname /etc/hostname \ --proc /proc \ --ro-bind-try /usr/local /usr/local \ ${dirs} ${net} \ - --setenv PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:${PATH}" \ + --setenv PATH "${PATH}:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/lib/jvm/default/bin" \ "$@" }