diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-07-23 22:00:12 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-07-23 22:00:12 +0200 |
commit | 0048f44c081dce2e296b48c71a208abf2a815c84 (patch) | |
tree | 65a5a5e098b297c6c2b4931931ebdf5c7837ce10 /defaults/linuxrc | |
parent | kmod: remove hardcoded $BROOT value (diff) | |
download | genkernel-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/linuxrc | 5 |
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 |