diff options
| author | Guillem Jover <guillem@debian.org> | 2009-05-24 22:08:58 +0200 |
|---|---|---|
| committer | Guillem Jover <guillem@debian.org> | 2009-05-24 22:08:58 +0200 |
| commit | 5ccdc88f40ec8bea792874b97596cda8368aff4d (patch) | |
| tree | 55972ff353ee2cdd16e24bf1e1d5a660a4c02357 /dselect/methods/disk | |
| parent | 328b98fff19dbafcb90008a0711672ded9c71401 (diff) | |
| download | dpkg-5ccdc88f40ec8bea792874b97596cda8368aff4d.tar.gz | |
dselect: Properly parse fdisk output in disk setup method
util-linux's fdisk has not emitted the Begin column since 1998-06-10
version 2.8. Change the parsing code accordingly to make it actually
work.
Diffstat (limited to 'dselect/methods/disk')
| -rwxr-xr-x | dselect/methods/disk/setup | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dselect/methods/disk/setup b/dselect/methods/disk/setup index 572a35ccb..8f52d16fd 100755 --- a/dselect/methods/disk/setup +++ b/dselect/methods/disk/setup @@ -82,9 +82,9 @@ getblockdev () { print_partition_table "$blockbase" >$tp.f set -e proposeddevice="$tryblockdevice" perl -ne ' -next unless /^ *Device +Boot +Begin +Start +End +Blocks +Id +System *$/i .. !/\S/; +next unless /^ *Device +Boot +Start +End +Blocks +Id +System *$/i .. !/\S/; next unless s:^/\S+:: && $& eq $ENV{"proposeddevice"}; -next unless s/^ +(\* +)?\d+ +\d+ +\d+ +\d+\+? +//; +next unless s/^ +(\* +)?\d+ +\d+ +\d+\+? +//; next unless m/^([0-9a-f]{1,2}) /i; %types= ( "1","msdos", "4","msdos", "6","msdos", "7","hpfs", "80","minix", "81","minix", "83","ext2" ); @@ -299,7 +299,7 @@ then fi set -e perl -ne ' -next unless /^ *Device +Boot +Begin +Start +End +Blocks +Id +System *$/i .. !/\S/; +next unless /^ *Device +Boot +Start +End +Blocks +Id +System *$/i .. !/\S/; next unless / [146] +DOS \d+-bit \S+$/; next unless m:^/\S+:; print $&; ' <$tp.f >$tp.d |
