]> git.donarmstrong.com Git - debhelper.git/blobdiff - autoscripts/postinst-suid
r507: * dh_installxfonts: separate multiple commands with \n so sed doesn't get
[debhelper.git] / autoscripts / postinst-suid
index 1294d313a63dfa4d695d50264eaf3d301decc980..820d69a4ee221182cc9ce7af31ace441e1a1d4a9 100644 (file)
@@ -1,6 +1,8 @@
-if [ -e /etc/suid.conf -a -x /usr/sbin/suidregister ]; then
-        suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS#
-else
-        chown #OWNER#.#GROUP# /#FILE#
-        chmod #PERMS# /#FILE#
+if [ "$1" = "configure" ]; then
+       if command -v suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then
+               suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS#
+       elif [ -e /#FILE# ]; then
+               chown #OWNER#.#GROUP# /#FILE#
+               chmod #PERMS# /#FILE#
+       fi
 fi