aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-07-23 22:00:12 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-07-23 22:00:12 +0200
commit0048f44c081dce2e296b48c71a208abf2a815c84 (patch)
tree65a5a5e098b297c6c2b4931931ebdf5c7837ce10 /defaults/linuxrc
parentkmod: remove hardcoded $BROOT value (diff)
downloadgenkernel-0048f44c081dce2e296b48c71a208abf2a815c84.tar.gz
genkernel-0048f44c081dce2e296b48c71a208abf2a815c84.tar.bz2
genkernel-0048f44c081dce2e296b48c71a208abf2a815c84.zip
defaults/linuxrc: Support devices with symlinks
/dev/vg/foo can be a symlink to ../dm-1. This commit will allow to use such a value for devices, i.e. ROOT=/dev/vg/foo. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'defaults/linuxrc')
-rw-r--r--defaults/linuxrc5
1 files changed, 4 insertions, 1 deletions
diff --git a/defaults/linuxrc b/defaults/linuxrc
index 5354d09..f1357f6 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -783,15 +783,18 @@ do
fi
;;
*)
- if [ -b "${REAL_ROOT}" ]
+ ROOT_DEV=$(readlink -f "${REAL_ROOT}")
+ if [ -b "${ROOT_DEV}" ]
then
got_good_root=1
+ REAL_ROOT=${ROOT_DEV}
echo
good_msg "Root device detected as ${REAL_ROOT}!"
break
fi
;;
esac
+ unset ROOT_DEV
if [ "${got_good_root}" != '1' ]
then