81
81
doit("install","-m","0644",$rules_file,"$tmp/lib/udev/rules.d/$dh{PRIORITY}$filename");
82
82
if (! $dh{NOSCRIPTS}) {
83
83
my $old="/etc/udev/$filename";
84
my $rule="/lib/udev/rules.d/$dh{PRIORITY}$filename";
85
autoscript($package,"preinst","preinst-udev","s!#OLD#!$old!g;s!#RULE#!$rule!g;s!#PACKAGE#!$package!g");
86
autoscript($package,"postinst","postinst-udev","s!#OLD#!$old!g;s!#RULE#!$rule!g");
84
my $rule="/etc/udev/rules.d/$dh{PRIORITY}$filename";
85
autoscript($package,"preinst","preinst-moveconffile","s!#OLD#!$old!g;s!#PACKAGE#!$package!g");
86
autoscript($package,"postinst","postinst-moveconffile","s!#OLD#!$old!g;s!#NEW#!$rule!g");
87
autoscript($package,"preinst","preinst-udev","s!#RULE#!$rule!g");
88
89
# Remove old rule from /etc, unless it's modified,
89
90
# in which case we leave it (or rename it)
91
$old="/etc/udev/rules.d/50-$filename";
92
$old="/etc/udev/rules.d/50-$filename";
93
$old="/etc/udev/rules.d/$dh{PRIORITY}$filename";
94
$old="/etc/udev/rules.d/$dh{PRIORITY}$filename";
95
$rule="/etc/udev/rules.d/$dh{PRIORITY}$filename";
97
autoscript($package,"preinst","preinst-udev-preserve","s!#OLD#!$old!g;s!#RULE#!$rule!g;s!#PACKAGE#!$package!g");
96
autoscript($package,"preinst","preinst-moveconffile","s!#OLD#!$old!g;s!#NEW#!$rule!g;s!#PACKAGE#!$package!g");
99
autoscript($package,"postinst","postinst-udev-preserve","s!#OLD#!$old!g;s!#RULE#!$rule!g");
98
autoscript($package,"postinst","postinst-moveconffile","s!#OLD#!$old!g;s!#NEW#!$rule!g");