Torsdag 20 desember 2007 10:31, skrev Michael De Groote:
> > What I will look into is the thousand separator.
> > For Norwegian thats a , but for other languages its a .
> > I will test that when Im back at work.
>
> did you build parted yourself?If so, maybe it should be built with a locale
> that has . as thousand-separator?
>
> Or better, modify script line like this
>
>
> OLD:
>
> ($line =~
> /^\d+\s+(\d+\.\d{3})\s+(\d+\.\d{3})\s+(primary|logical|extended)/);
>
> NEW:
>
> ($line =~ /^\d+\s+(\d+*(\.|,)*\d{3})\s+(\d+*(\.|,)*
> \d{3})\s+(primary|logical|extended)/);
>
>

Well, I forgot that I had a test build with parted 1.8.8 on the server..
..a bit stupid, but I got a glimpse of the future :-)

parted 1.8.x is the future anyway, and the thousand separator issue is real. 
One possible solution for that is to set the language to C when building, but 
I have not looked into that yet. I hope that is possible somehow.
In addition the parted output has changed like Juan said, around1.7.
So; this code has to be changed before we can use a newer parted.

Anyway: Thanks for the input!


As for parted 1.6.22 and release 4.7, I think I have a something.
Se attached diff.

Parted seem to make a fat32 partition even if its told to make a ntfs 
partition.
Its probably better just to make a partition..
Ah, well I get to see it when the machine has finished installing.

--- install-cvs-2007-12-20.pl	2007-12-20 12:03:17.000000000 +0100
+++ install.pl	2007-12-20 11:37:27.000000000 +0100
@@ -634,12 +634,17 @@
             $fs = $type_map{$type};
         }
 
-    if ($ptype eq 'pri') { $parttype = 'primary' }
-    elsif ($ptype eq 'log') { $parttype = 'logical' }
-    elsif ($ptype eq 'ext') { $parttype = 'extended'; $fs='' }
+        if ($ptype eq 'pri') { $parttype = 'primary' }
+        elsif ($ptype eq 'log') { $parttype = 'logical' }
+        elsif ($ptype eq 'ext') { $parttype = 'extended'; $fs='' }
+
+        if (($ptype eq 'ext') or ($fs eq 'ntfs'))  { 
+            $ret = "$parted mkpart $parttype $fs $start $end"; 
+        } else { 
+            $ret = "$parted mkpartfs $parttype $fs $start $end"; 
+        }
+        print "DEBUG: $ret \n";
 
-        $ret = "$parted mkpart $parttype $fs $start $end";
-       print "DEBUG: $ret \n";
     }
     else {
         die "Unable to convert '$fdisk_cmd' to Parted commands; bailing";
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
unattended-devel mailing list
unattended-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unattended-devel

Reply via email to