From: Joachim Wiedorn Date: Sun, 20 Mar 2011 14:41:26 +0000 (+0100) Subject: Fix typos in script lilo-uuid-diskid X-Git-Tag: debian/23.1-2~4 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=89ce6d4a1506ec5bee58d724786746260b3448d7;p=rrq%2Fmaintain_lilo.git Fix typos in script lilo-uuid-diskid --- diff --git a/debian/changelog b/debian/changelog index 452f31d..169f2be 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,8 @@ lilo (1:23.1-2) unstable; urgency=low * debian/control: - Remove dependency to lilo in package lilo-doc. (Closes: #613753) * Fix: save errno for second command (device.c). - * Fix: save file permissions for converted lilo.conf. (Closes: #615103) + * Fix: save file permissions for converted lilo.conf (Closes: #615103) + and fix some typos in script lilo-uuid-diskid. * Fix: missleading error message in geometry.c. (Closes: #445264) * Reformatting of mkrescue manpage (thanks to M.E. Schauer). (Closes: #617282) diff --git a/debian/scripts/lilo-uuid-diskid b/debian/scripts/lilo-uuid-diskid index 6b0c5d8..ab03744 100644 --- a/debian/scripts/lilo-uuid-diskid +++ b/debian/scripts/lilo-uuid-diskid @@ -204,12 +204,10 @@ sub read_fstab { } # check if the found partition is a raid volume if($root_part =~ /\/dev\/md/) { - $root_part = check_raid($root_part); } unless ($root_part =~ /^UUID/) { # now find the right block device name $root_part =~ s/\d+$//; - $root_part =~ s/part$/disc/; } return $root_part; @@ -218,14 +216,13 @@ sub read_fstab { sub check_raid { my $part = $_[0]; - + my $mdname; + my $md; + my @devices; + # check if the found partition is a raid volume if($part =~ /\/dev\/md/) { - my $mdname; - my $md; - my @devices; - $mdname = $part; $mdname =~ s/\/dev\///; $mdname =~ s/\///; @@ -258,7 +255,7 @@ sub detect_root_device { } } - # check if root device exist + # check if root device exist / also for raid volume if (-b $root_disk) { if($opt_v) { print "convert root option $root_disk into new UUID\n"; } $root_id = find_id_link($root_disk,$uuidpath); @@ -271,8 +268,8 @@ sub detect_root_device { $root_link =~ s{\"}{}g; $root_link =~ s{^LABEL=}{/dev/disk/by-label/}; $root_link =~ s{^UUID=}{/dev/disk/by-uuid/}; - if (not -b $root_link) { - if($opt_v) { print "cannot check $root_disk: link does not exist!\n"; } + if (not -l $root_link) { + if($opt_v) { print "cannot check $root_link: link does not exist!\n"; } } } return $exit; @@ -447,7 +444,7 @@ Lines in the configuration file /etc/lilo.conf: boot = /dev/disk/by-id/ata-SAMSUNG_SV1604N_S01FJ10X999999 #root = /dev/sda1 - root = "UUID=/dev/disk/by-uuid/18843936-00f9-4df0-a373-000d05a5dd44" + root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44" =head1 OPTIONS