]> git.donarmstrong.com Git - debhelper.git/blobdiff - autoscripts/postinst-init
r547: * Use invoke-rc.d always now that it is in policy. Fall back to old behavior
[debhelper.git] / autoscripts / postinst-init
index 159b12d70c3aeb745ab76fcd4415b5689e589be0..b5bd7a5798870f5e7d311e1ed3f5867852b9df6c 100644 (file)
@@ -1,4 +1,8 @@
-if [ -e "/etc/init.d/#SCRIPT#" ]; then
+if [ -x "/etc/init.d/#SCRIPT#" ]; then
        update-rc.d #SCRIPT# #INITPARMS# >/dev/null
-       /etc/init.d/#SCRIPT# start
+       if [ -x /usr/sbin/invoke-rc.d ]; then
+               invoke-rc.d #SCRIPT# start
+       else
+               /etc/init.d/#SCRIPT# start
+       fi
 fi