[PATCH] Also call fdisk in C locale to make the output predictable.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Also call fdisk in C locale to make the output predictable.

Alexander Boström
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






--
Fedora-livecd-list mailing list
[hidden email]
https://www.redhat.com/mailman/listinfo/fedora-livecd-list
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Also call fdisk in C locale to make the output predictable.

Alexander Boström
Uhm actually no, I don't know what I was doing and thinking. But it
might be a good idea to apply it anyway.

/abo

sön 2009-12-27 klockan 12:13 +0100 skrev Alexander Boström:

> 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


--
Fedora-livecd-list mailing list
[hidden email]
https://www.redhat.com/mailman/listinfo/fedora-livecd-list