diff options
author | Ben Hutchings <benh@debian.org> | 2009-12-10 01:48:04 +0000 |
---|---|---|
committer | Ben Hutchings <benh@debian.org> | 2009-12-10 01:48:04 +0000 |
commit | 8bf9a24285fdd87c6a25484f0a00eb15b729cf3f (patch) | |
tree | 981b9a504ce1acde9e2c8b541a7a0438d65f3c57 /debian/templates | |
parent | dcb78dcf90acf71872f90bd1afe24aec73620df9 (diff) |
postinst: Fix failure paths in check for missing firmware (Closes: #560263)
svn path=/dists/trunk/linux-2.6/; revision=14768
Diffstat (limited to 'debian/templates')
-rwxr-xr-x | debian/templates/temp.image.plain/postinst | 12 |
1 files changed, 7 insertions, 5 deletions
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 (<DEP>) { if (m|(.*/([^/]*)\.ko):|) { my ($path, $module) = ($1, $2); @@ -711,7 +709,7 @@ if ( -d "$modules_base/$version" ) { } } close(DEP); - open(MODULES, '</proc/modules') or last FIRMWARE_CHECK; + open(MODULES, '</proc/modules') or return; while (<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 { |