From 9abde152f5c1b706fcda5210eb5b952b978405a4 Mon Sep 17 00:00:00 2001 From: hollisb Date: Wed, 23 Nov 2005 05:25:38 +0000 Subject: [PATCH] 2005-11-22 Hollis Blanchard * util/powerpc/ieee1275/grub-install.in: Run the mount point check before installing files. --- ChangeLog | 5 +++++ util/powerpc/ieee1275/grub-install.in | 17 ++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1918abf65..06db3b7de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-22 Hollis Blanchard + + * util/powerpc/ieee1275/grub-install.in: Run the mount point + check before installing files. + 2005-11-22 Mike Small * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition diff --git a/util/powerpc/ieee1275/grub-install.in b/util/powerpc/ieee1275/grub-install.in index 4405894fd..42542bd2b 100644 --- a/util/powerpc/ieee1275/grub-install.in +++ b/util/powerpc/ieee1275/grub-install.in @@ -120,6 +120,14 @@ else exit 1 fi +# Find the partition at the right mount point. +install_device=`awk '$2 == '"\"$grubdir\""' { print $1 }' < /proc/mounts` +if test "x$install_device" = x; then + echo "$grubdir must be a mount point." + exit 1 +fi +# XXX warn on firmware-unreadable filesystems? + # Create the GRUB directory if it is not present. test -d "$bootdir" || mkdir "$bootdir" || exit 1 test -d "$grubdir" || mkdir "$grubdir" || exit 1 @@ -144,15 +152,6 @@ fi "$grub_mkimage" --output=${grubdir}/grub $modules || exit 1 if test $update_nvram = yes; then - # Find the partition at the right mount point. - install_device=`awk '$2 == '"\"$grubdir\""' { print $1 }' < /proc/mounts` - if test "x$install_device" = x; then - # Uh oh... grub-mkimage installed into a plain directory somewhere. - echo "$grubdir is not a mount point!" - exit 1 - fi - # XXX warn on firmware-unreadable filesystems? - set $ofpathname dummy if test -f "$1"; then : -- 2.47.3