diff --git a/debian/changelog b/debian/changelog index fbaef264c..ee04fb372 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,7 +10,9 @@ linux-2.6 (2.6.32-2) UNRELEASED; urgency=low [ Ben Hutchings ] * aufs2: Update to snapshot from 2009-12-05 - + * postinst: Fix failure paths in check for missing firmware + (Closes: #560263) + -- Bastian Blank Sun, 06 Dec 2009 20:42:14 +0100 linux-2.6 (2.6.32-1) unstable; urgency=low diff --git a/debian/templates/temp.image.plain/postinst b/debian/templates/temp.image.plain/postinst index 79e261353..439ab1595 100755 --- a/debian/templates/temp.image.plain/postinst +++ b/debian/templates/temp.image.plain/postinst @@ -625,8 +625,7 @@ sub image_magic { ###################################################################### ###################################################################### -# We may not have any modules installed -if ( -d "$modules_base/$version" ) { +sub do_modules { print STDERR "Running depmod.\n"; my $ret = system("depmod -a -F $realimageloc/System.map-$version $version"); my $exit_value = $? >> 8; @@ -698,11 +697,10 @@ if ( -d "$modules_base/$version" ) { my $new_patchlevel = $version; $new_patchlevel =~ s/^2\.6\.(\d+).*/$1/; - FIRMWARE_CHECK: if ($new_patchlevel > $running_patchlevel) { my $missing = ''; my %module_paths; - open(DEP, "<$modules_base/$version/modules.dep") or last FIRMWARE_CHECK; + open(DEP, "<$modules_base/$version/modules.dep") or return; while () { if (m|(.*/([^/]*)\.ko):|) { my ($path, $module) = ($1, $2); @@ -711,7 +709,7 @@ if ( -d "$modules_base/$version" ) { } } close(DEP); - open(MODULES, ') { s/ .*//s; my $module = $_; @@ -769,6 +767,10 @@ if ( -d "$modules_base/$version" ) { } } +# We may not have any modules installed +if (-d "$modules_base/$version") { + &do_modules(); +} sub find_initramfs_tool {