]> git.donarmstrong.com Git - debhelper.git/blobdiff - autoscripts/postinst-udev
r2004: file. (Thanks Wakko)
[debhelper.git] / autoscripts / postinst-udev
index e73cb01010528f957956d0e1b4745e81274725fd..40b953dd6ea9481dd7e469dacb9d931d619b918c 100644 (file)
@@ -1,3 +1,9 @@
-if [ "$1" = configure -a -z "$2" ]; then
-       ln -s ../#FILE# /etc/udev/rules.d/#PRIO##FILE#
+if [ "$1" = configure ]; then
+       if [ -e "#OLD#" ]; then
+               echo "Preserving user changes to #RULE# ..."
+               if [ -e "#RULE#" ]; then
+                       mv -f "#RULE#" "#RULE#.dpkg-new"
+               fi
+               mv -f "#OLD#" "#RULE#"
+       fi
 fi