diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-03-02 21:20:29 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-03-02 21:20:29 -0500 |
commit | 4ad78d9db390d7c68d48fc9017fbec516a68a9fe (patch) | |
tree | 5b89271ad8a9f36c1eb0969b08591dea9ad031d0 /dh_installmodules | |
parent | e7ab4dca7d240f48a51960a6978c05d2f5aa7a97 (diff) |
conffile moving idiocy
* dh_installmodules: Give files in /etc/modprobe.d a .conf
syntax, as required by new module-init-tools.
* dh_installmodules: Add preinst and postinst code to handle
cleanly renaming the modprobe.d files on upgrade.
* Two updates to conffile moving code from wiki:
- Support case where the conffile name is a substring of another
conffile's name.
- Support case where dpkg-query says the file is obsolete.
Diffstat (limited to 'dh_installmodules')
-rwxr-xr-x | dh_installmodules | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dh_installmodules b/dh_installmodules index 6a08eb77..6bb22500 100755 --- a/dh_installmodules +++ b/dh_installmodules @@ -21,7 +21,7 @@ dh_installmodules is a debhelper program that is responsible for registering kernel modules. Files named debian/package.modprobe will be installed in -etc/modprobe.d/package in the package build directory, to be used by +etc/modprobe.d/package.conf in the package build directory, to be used by module-init-tools's version of modprobe. Kernel modules are searched for in the package build directory and if @@ -102,7 +102,11 @@ foreach my $package (@{$dh{DOPACKAGES}}) { if (! -e "$tmp/etc/modprobe.d") { doit("install","-d","$tmp/etc/modprobe.d"); } - doit("install","-m","0644",$modprobe_file,"$tmp/etc/modprobe.d/".pkgfilename($package)); + my $old="/etc/modprobe.d/".pkgfilename($package); + my $new=$old.".conf"; + doit("install","-m","0644",$modprobe_file,"$tmp/$new"); + autoscript($package,"preinst","preinst-moveconffile","s!#OLD#!$old!g;s!#PACKAGE#!$package!g"); + autoscript($package,"postinst","postinst-moveconffile","s!#OLD#!$old!g;s!#NEW#!$new!g"); } if (! $dh{NOSCRIPTS}) { |