From e073cb0e7c16e5421b820001305dc823ee423495 Mon Sep 17 00:00:00 2001 From: Dennis ten Hoove Date: Sun, 9 Jun 2024 21:39:47 +0200 Subject: [PATCH] Add arkdep_bin to PATH --- .../overlay/post_bootstrap/etc/profile.d/arkdep-bin.sh | 2 ++ .../usr/local/bin => post_bootstrap/usr/arkdep_bin}/pacman | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 arkdep-build.d/arkanelinux/overlay/post_bootstrap/etc/profile.d/arkdep-bin.sh rename arkdep-build.d/arkanelinux/overlay/{post_install/usr/local/bin => post_bootstrap/usr/arkdep_bin}/pacman (90%) diff --git a/arkdep-build.d/arkanelinux/overlay/post_bootstrap/etc/profile.d/arkdep-bin.sh b/arkdep-build.d/arkanelinux/overlay/post_bootstrap/etc/profile.d/arkdep-bin.sh new file mode 100644 index 0000000..a19bedc --- /dev/null +++ b/arkdep-build.d/arkanelinux/overlay/post_bootstrap/etc/profile.d/arkdep-bin.sh @@ -0,0 +1,2 @@ +# Utilized to prioritize wrapper applications in PATH +PATH="/usr/arkdep_bin:$PATH" diff --git a/arkdep-build.d/arkanelinux/overlay/post_install/usr/local/bin/pacman b/arkdep-build.d/arkanelinux/overlay/post_bootstrap/usr/arkdep_bin/pacman similarity index 90% rename from arkdep-build.d/arkanelinux/overlay/post_install/usr/local/bin/pacman rename to arkdep-build.d/arkanelinux/overlay/post_bootstrap/usr/arkdep_bin/pacman index 3b9be75..ad60783 100755 --- a/arkdep-build.d/arkanelinux/overlay/post_install/usr/local/bin/pacman +++ b/arkdep-build.d/arkanelinux/overlay/post_bootstrap/usr/arkdep_bin/pacman @@ -1,9 +1,7 @@ #!/usr/bin/env bash -if [[ ! $EUID -eq 0 ]]; then - printf 'You have to be root to perform this action.\n' - exit 1 -fi +# Elevate permissions to root +[[ $EUID -eq 0 ]] || exec sudo bash $0 $@ [[ $@ =~ (-r|--root) ]] && no_check=1 # Do not check if custom root is defined [[ $LD_LIBRARY_PATH =~ (libfakeroot) ]] && no_check=1 # Do not check if running as fakeroot