X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=ybin%2Fyabootconfig;h=45914f82bf1a902a39ae46c11a2d347ad75105d8;hp=f343a7dad1f3ba74f9894bbac5849b6f2c14d4fc;hb=15b93b378020b59031b991abe31b130ca105be03;hpb=e19f440a0df591a3e5174218d3bcc6d01ffb07ee diff --git a/ybin/yabootconfig b/ybin/yabootconfig index f343a7d..45914f8 100755 --- a/ybin/yabootconfig +++ b/ybin/yabootconfig @@ -27,7 +27,7 @@ if [ -n "$PATH_PREFIX" ] ; then PATH="${PATH}:${PATH_PREFIX}/sbin:${PATH_PREFIX}/bin:${PATH_PREFIX}/usr/sbin:${PATH_PREFIX}/usr/bin:${PATH_PREFIX}/usr/local/sbin:${PATH_PREFIX}/usr/local/bin" fi PRG="${0##*/}" -VERSION=1.0.8-UNSUPPORTED_UNRELEASED_DEVEL +VERSION=1.0.8 CHROOT=/ ## $CONFIG is relative to $CHROOT CONFIG=etc/yaboot.conf @@ -390,6 +390,21 @@ if [ -z "$ROOT" ] ; then fi fi +## dereference label or uuid if necessary +case "$ROOT" in + LABEL=*|UUID=*) + if ! (command -v findfs > /dev/null 2>&1) ; then + echo 1>&2 "$PRG: Unable to locate findfs, aborting..." + exit 1 + fi + ROOT="$(findfs "$ROOT")" + if [ -z "$ROOT" -o $? != 0 ] ; then + echo 1>&2 "$PRG: Could not determine root partition, aborting..." + exit 1 + fi + ;; +esac + ## make sure root device exists if [ ! -e "$ROOT" ] ; then echo 1>&2 "$PRG: $ROOT: No such file or directory"