From: Vladimir Serbinenko Date: Sat, 7 Dec 2013 15:09:39 +0000 (+0100) Subject: Merge GRUBFS and GRUB_FS variables. X-Git-Tag: grub-2.02-beta1~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c4ea9c7b5deedff6e629d169bda2d381f849520;p=thirdparty%2Fgrub.git Merge GRUBFS and GRUB_FS variables. --- diff --git a/ChangeLog b/ChangeLog index d7b982294..b27c22d20 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-12-07 Vladimir Serbinenko + + Merge GRUBFS and GRUB_FS variables. + 2013-12-07 Andrey Borzenkov Revert commit 69ca97c820, it caused failures when using OS device name diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in index 016ee8259..7b85c8817 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -139,6 +139,10 @@ GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_u # choosing Hurd filesystem module. GRUB_FS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2> /dev/null || echo unknown`" +if [ x"$GRUB_FS" = xunknown ]; then + GRUB_FS="$(stat -f --printf=%T / || echo unknown)" +fi + if test -f ${sysconfdir}/default/grub ; then . ${sysconfdir}/default/grub fi diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index e27d6f75e..00d193159 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -51,13 +51,7 @@ else LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID} fi -GRUBFS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`" - -if [ x"$GRUBFS" = x ]; then - GRUBFS="$(stat -f --printf=%T / || true)" -fi - -case x"$GRUBFS" in +case x"$GRUB_FS" in xbtrfs) rootsubvol="`make_system_path_relative_to_its_root /`" rootsubvol="${rootsubvol#/}" diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in index f12f05934..a60843500 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -59,13 +59,7 @@ if [ "${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}" ]; then GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}" fi -GRUBFS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`" - -if [ x"$GRUBFS" = x ]; then - GRUBFS="$(stat -f --printf=%T /)" -fi - -case x"$GRUBFS" in +case x"$GRUB_FS" in xbtrfs) rootsubvol="`make_system_path_relative_to_its_root /`" rootsubvol="${rootsubvol#/}"