Florian Effenberger schrieb: > Hi Warren, > > >>Hmm ok, just wanted to make sure. Maybe what I saw wasn't related to the >>issue your having. I've attached the patch(s) > > > which version are these patches for? Look here: > > # patch -p0 < /root/unattended/install_pl.patch > (Stripping trailing CRs from patch.) > patching file install.pl > Hunk #1 FAILED at 490. > Hunk #2 FAILED at 533. > Hunk #3 FAILED at 656. > 3 out of 3 hunks FAILED -- saving rejects to file install.pl.rej >
I remember: I had to patch the changes in manually. Perhaps a mailing or crlf problem. See attached file. Falko
--- install.pl.orig 2005-03-04 21:22:04.000000000 +0100 +++ install.pl 2006-06-07 13:28:24.000000000 +0200 @@ -490,6 +490,28 @@ return get_disk_sectors () * 512 / 1024 / 1024; } +# Converts new parted output from mb/kb to mb without designator +sub convert_parted_output ($) { + # Convert number to mb in 1024 size + my $input = shift; + my $output = 0; + + if ($input =~ /MB/i) { + my ($size) = $input =~ /(\d+)\w+/; + $output = $size; + } + if ($input =~ /kB/i) { + my ($size) = $input =~ /(\d+)\w+/; + $output = ($size / 1000) * 1024; + } + if ($input =~ /GB/i) { + my ($size) = $input =~ /(\d+)\w+/; + $output = $size * 1024; + } + + return $output; +} + # Find the largest interval of free space on the drive which does not # overlap other partitions. If argument is true, find space for # creating a logical partition (i.e., within the extended partition). @@ -511,10 +533,14 @@ while (my $line = <PARTED>) { my ($start, $end, $parttype) = - ($line =~ /^\d+\s+(\d+\.\d{3})\s+(\d+\.\d{3})\s+(primary|logical|extended)/); + ($line =~ /^\d+\s+(\d+\w+)\s+(\d+\w+)\s+\d+\w+\s+(primary|logical|extended)/); defined $start && defined $end && defined $parttype or next; + # Convert parted output + $start = convert_parted_output($start); + $end = convert_parted_output($end); + if ($logical && $parttype eq 'extended') { # If multiple extended partitions (weird), use the first. defined $ext_start && defined $ext_end @@ -630,9 +656,9 @@ $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='' } $ret = "$parted mkpart $parttype $fs $start $end"; }
_______________________________________________ unattended-devel mailing list unattended-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/unattended-devel