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
## make fake `id' if its missing, outputs 0 since if its missing we
## are probably running on boot floppies and thus are root.
-if (command -v id > /dev/null 2>&1) ; then
+if (command -v id > /dev/null 2>&1) ; then
true
else
id()
if [ $# != 0 ] ; then
while true ; do
- case "$1" in
+ case "$1" in
-V|--version)
version
exit 0
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"
echo 1>&2 "$PRG: yaboot is not installed correctly"
exit 1
fi
-fi
+fi
## check for properly (read debian) packaged yaboot.
if [ -d ${CHROOT}usr/share/doc/yaboot/examples ] ; then
##
## run: \"man yaboot.conf\" for details. Do not make changes until you have!!
${HEADER}##
-## For a dual-boot menu, add one or more of:
+## For a dual-boot menu, add one or more of:
## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ\n
boot=${BOOT}${DEVICE:-}
partition=$PARTITION