[Fedora-livecd-list] [PATCH] Also call fdisk in C locale to make the output predictable.

Alexander Boström abo at root.snowtree.se
Sun Dec 27 11:13:32 UTC 2009


I had to run livecd-iso-to-disk in an English locale to make it accept
that the partition really was bootable. This should fix that. 

---
 tools/livecd-iso-to-disk.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 3a4726d..f625d2b 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -128,7 +128,7 @@ checkPartActive() {
         return
     fi
 
-    if [ "$(/sbin/fdisk -l $device 2>/dev/null |grep $dev |awk {'print $2;'})" != "*" ]; then
+    if [ "$(LC_ALL=C /sbin/fdisk -l $device 2>/dev/null |grep $dev |awk {'print $2;'})" != "*" ]; then
 	echo "Partition isn't marked bootable!"
 	echo "You can mark the partition as bootable with "
         echo "    # /sbin/parted $device"
@@ -186,7 +186,7 @@ checkGPT() {
     dev=$1
     getdisk $dev
 
-    if [ "$(/sbin/fdisk -l $device 2>/dev/null |grep -c GPT)" -eq "0" ]; then
+    if [ "$(LC_ALL=C /sbin/fdisk -l $device 2>/dev/null |grep -c GPT)" -eq "0" ]; then
        echo "EFI boot requires a GPT partition table."
        echo "This can be done manually or you can run with --format"
        exitclean
-- 
1.6.5.2









More information about the Fedora-livecd-list mailing list