[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Remove GRUBFS
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
[PATCH] Remove GRUBFS |
Date: |
Fri, 06 Dec 2013 14:38:21 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 |
It seems that in our codebase we have both GRUBFS and GRUB_FS both referring to
the same thing: FS of /. Merge them
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 016ee82..7b85c88 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 e27d6f7..00d1931 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 f12f059..a608435 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#/}"
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Remove GRUBFS,
Vladimir 'φ-coder/phcoder' Serbinenko <=