00-rootdev.sh: use realpath instead of readlink to resolve symlinks

This may fix Gentoo bug #501226
master v54
Fabio Erculiani 11 years ago
parent c90b34046e
commit fd8ba0d9db

@ -200,7 +200,7 @@ ensure_initramfs_mounts() {
dev=$(_get_mount_device "${fs}")
[ -z "${dev}" ] && continue
# Resolve it like util-linux mount does
[ -L "${dev}" ] && dev=$(readlink "${dev}")
[ -L "${dev}" ] && dev=$(realpath "${dev}")
# In this case, it's probably part of the filesystem
# and not a mountpoint
[ -z "${dev}" ] && continue

@ -136,7 +136,7 @@ append_busybox() {
# Set up a few default symlinks
local default_applets="[ ash sh mount uname ls echo cut cat flock stty"
default_applets+=" readlink mountpoint dmesg udhcpc"
default_applets+=" readlink realpath mountpoint dmesg udhcpc"
for i in ${BUSYBOX_APPLETS:-${default_applets}}; do
rm -f ${TEMP}/initramfs-busybox-temp/bin/$i
ln -s busybox ${TEMP}/initramfs-busybox-temp/bin/$i ||

Loading…
Cancel
Save