summaryrefslogtreecommitdiff
path: root/dh_installudev
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-09-14 13:31:34 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-09-14 13:31:34 -0400
commitf80b0ff42a05879170a84b2c63e05e5c3742910d (patch)
treeca0ee0e86d0d18bfcd95b7342cb3e4e606c8c00f /dh_installudev
parenta71b4095bfbae02ed2a14bc2e883c899fb28300a (diff)
dh_installudev: With --name, install debian/<package>.<name>.udev to rules.d/<priority>-<name>, the same as debian/<name>.udev is installed for the first package. Closes: #546337
Diffstat (limited to 'dh_installudev')
-rwxr-xr-xdh_installudev6
1 files changed, 5 insertions, 1 deletions
diff --git a/dh_installudev b/dh_installudev
index 7193ebd..9bfd662 100755
--- a/dh_installudev
+++ b/dh_installudev
@@ -89,6 +89,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
$filename = "$package.udev";
}
$filename=~s/\.udev$/.rules/;
+ my $oldfilename=$filename;
+ if (defined $dh{NAME}) {
+ $filename="$dh{NAME}.rules";
+ }
if ($rules_file) {
if (! -e "$tmp/lib/udev/rules.d") {
@@ -100,7 +104,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
# Remove old rule from /etc, unless it's modified,
# in which case we rename it to match the new
# file in /lib, so it will override.
- my $old="/etc/udev/rules.d/$old_priority$filename";
+ my $old="/etc/udev/rules.d/$old_priority$oldfilename";
$rule=~s/^\/lib/\/etc/;
autoscript($package,"preinst","preinst-moveconffile","s!#OLD#!$old!g;s!#NEW#!$rule!g;s!#PACKAGE#!$package!g");
autoscript($package,"postinst","postinst-moveconffile","s!#OLD#!$old!g;s!#NEW#!$rule!g");