Use vol_id if available since the version of blkid in lenny does not support the output format we need (Closes: #576608)

svn path=/dists/sid/linux-2.6/; revision=15509
This commit is contained in:
Ben Hutchings 2010-04-11 00:50:08 +00:00
parent 8f486a667e
commit 06986e9c25
3 changed files with 11 additions and 2 deletions

2
debian/changelog vendored
View File

@ -14,6 +14,8 @@ linux-2.6 (2.6.32-12) UNRELEASED; urgency=low
(Closes: #577047)
- Check device IDs in mdadm.conf rather than assuming it needs manual
conversion
- Use vol_id if available since the version of blkid in lenny does not
support the output format we need (Closes: #576608)
[ maximilian attems]
* Ignore ABI breakage due to libata switch.

View File

@ -1245,10 +1245,16 @@ sub add_tag {
}
sub scan_devices {
my $id_command;
if (-x '/sbin/vol_id') {
$id_command = '/sbin/vol_id';
} else {
$id_command = 'blkid -o udev -s LABEL -s UUID';
}
for (`blkid -o device`) {
chomp;
my $bdev = $_;
for (`blkid -o udev -s LABEL -s UUID '$bdev'`) {
for (`$id_command '$bdev'`) {
if (/^ID_FS_(LABEL|UUID)_ENC=(.+)\n$/) {
add_tag($bdev, $1, $2);
}

View File

@ -79,7 +79,8 @@ Description: Support files for Linux @upstreamversion@
Package: linux-base
Architecture: all
Depends: libapt-pkg-perl, libuuid-perl, ${misc:Depends}
Depends: libapt-pkg-perl, libuuid-perl, ${misc:Depends},
util-linux (>= 2.16-1) | udev (<< 146-1)
Description: Linux image base package
This package contains files and support scripts for all Linux
images.