summaryrefslogtreecommitdiff
path: root/dh_installmodules
diff options
context:
space:
mode:
authorjoey <joey>2001-02-09 00:57:53 +0000
committerjoey <joey>2001-02-09 00:57:53 +0000
commit053f6f8b4e7431d32511aef209188a084e8c7e79 (patch)
tree209a51c8c8fdbcce25c834198f1b3ef705dcb5b0 /dh_installmodules
parentae0346306694bb2c52193f6352755c223e6e8935 (diff)
downloaddebhelper-053f6f8b4e7431d32511aef209188a084e8c7e79.tar.gz
r420: big monsta changes
Diffstat (limited to 'dh_installmodules')
-rwxr-xr-xdh_installmodules23
1 files changed, 12 insertions, 11 deletions
diff --git a/dh_installmodules b/dh_installmodules
index b75c58fa..e31d1d02 100755
--- a/dh_installmodules
+++ b/dh_installmodules
@@ -2,6 +2,7 @@
#
# Register modules with modutils.
+use strict;
use Debian::Debhelper::Dh_Lib;
use File::Find;
init();
@@ -16,24 +17,24 @@ sub find_kernel_modules {
return @results > 0;
}
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
- $TMP=tmpdir($PACKAGE);
- $file=pkgfile($PACKAGE,"modules");
+foreach my $package (@{$dh{DOPACKAGES}}) {
+ my $tmp=tmpdir($package);
+ my $file=pkgfile($package,"modules");
- if (! -e $TMP) {
- doit("install","-d",$TMP);
+ if (! -e $tmp) {
+ doit("install","-d",$tmp);
}
if ($file) {
- if (! -e "$TMP/etc/modutils") {
- doit("install","-d","$TMP/etc/modutils");
+ if (! -e "$tmp/etc/modutils") {
+ doit("install","-d","$tmp/etc/modutils");
}
- doit("install","-m","0644",$file,"$TMP/etc/modutils/$PACKAGE");
+ doit("install","-m","0644",$file,"$tmp/etc/modutils/$package");
}
if (! $dh{NOSCRIPTS} &&
- ($file || find_kernel_modules("$TMP/lib/modules"))) {
- autoscript($PACKAGE,"postinst","postinst-modules","s/#PACKAGE#/$PACKAGE/");
- autoscript($PACKAGE,"postrm","postrm-modules","s/#PACKAGE#/$PACKAGE/");
+ ($file || find_kernel_modules("$tmp/lib/modules"))) {
+ autoscript($package,"postinst","postinst-modules","s/#PACKAGE#/$package/");
+ autoscript($package,"postrm","postrm-modules","s/#PACKAGE#/$package/");
}
}