From 0009e91a8f9487f4da53a9a08ced341d09402d3a Mon Sep 17 00:00:00 2001 From: "Gerd v. Egidy" Date: Mon, 25 Oct 2021 20:55:23 +0200 Subject: [PATCH] Support chrooting on older systems without usrmerge On newer systems /bin is linked to /usr/bin, the same goes for /sbin. This is called usrmerge. Some distributions seem to have introduced usrmerge just very recently, like openSUSE in 2021. So SystemRescue should fully support this for years to come. So we need /bin, /sbin and /usr/sbin in the default $PATH to make it easy to use from within a chroot. --- airootfs/etc/profile.d/env-path.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airootfs/etc/profile.d/env-path.sh b/airootfs/etc/profile.d/env-path.sh index 5e8b3b9..da12e9f 100644 --- a/airootfs/etc/profile.d/env-path.sh +++ b/airootfs/etc/profile.d/env-path.sh @@ -1,2 +1,3 @@ # /sbin is not used on ArchLinux but it is often required in chroot -export PATH=${PATH}:/sbin:/usr/share/sysrescue/bin/ +# also support chrooting on older systems without usrmerge (/usr/sbin and /bin) +export PATH=${PATH}:/sbin:/usr/sbin:/bin:/usr/share/sysrescue/bin/