mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
init: Set and export PATH before running any external commands
busybox sh and klibc dash have different default values for $PATH which could affect which could affect which commands we run later. klibc dash also does not export $PATH, and this means we fail to run fsck - it is executed indirectly through logsave, and logsave cannot find it. Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
parent
6ae39ebef1
commit
67e53ea38f
4
init
4
init
@ -2,6 +2,10 @@
|
||||
|
||||
echo "Loading, please wait..."
|
||||
|
||||
# Default PATH differs between shells, and is not automatically exported
|
||||
# by klibc dash. Make it consistent.
|
||||
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
|
||||
[ -d /dev ] || mkdir -m 0755 /dev
|
||||
[ -d /root ] || mkdir -m 0700 /root
|
||||
[ -d /sys ] || mkdir /sys
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user