]> git.donarmstrong.com Git - debhelper.git/blobdiff - autoscripts/postinst-init
Merge branch 'master' into buildsystems
[debhelper.git] / autoscripts / postinst-init
index 051f77474c40adc46ec12d7c32046ed70a31845c..6a1c5727e14972f512b32b5d4141c625f2a9f0fe 100644 (file)
@@ -1,4 +1,8 @@
 if [ -x "/etc/init.d/#SCRIPT#" ]; then
        update-rc.d #SCRIPT# #INITPARMS# >/dev/null
-       /etc/init.d/#SCRIPT# start
+       if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+               invoke-rc.d #SCRIPT# start || #ERROR_HANDLER#
+       else
+               /etc/init.d/#SCRIPT# start || #ERROR_HANDLER#
+       fi
 fi