On Tue, May 15, 2007 at 10:22:06PM +0200, Yoshinori K. Okuji wrote:
> > Or perhaps it should do like powerpc and check that /boot/grub is a mount
> > point?
> >
> > # 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
> 
> It is a bad idea to use /proc, at least without checking the operating 
> system. 
> This makes the script unportable among host operating systems.

Note that this code is in powerpc/../grub-install.in already, and in my version
of i386/efi/grub-install.in it didn't made in.  Instead, sanity check there is:

  fs_module=`$grub_probe --target=fs --device-map=${device_map} ${grubdir}`
  if test "x$fs_module" = xfat; then :; else
      echo "${grubdir} doesn't look like an EFI partition." 1>&2
      exit 1
  fi

-- 
Robert Millan

My spam trap is [EMAIL PROTECTED]  Note: this address is only intended
for spam harvesters.  Writing to it will get you added to my black list.


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to