From ab623d0bf8c2d59507f8e666253e316c76e2de90 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Mon, 17 Jan 2011 01:52:12 -0800 Subject: dh_installinit: never call init scripts directly, only through invoke-rc.d --- autoscripts/postinst-init | 6 +----- autoscripts/postinst-init-restart | 6 +----- autoscripts/prerm-init | 6 +----- autoscripts/prerm-init-norestart | 6 +----- 4 files changed, 4 insertions(+), 20 deletions(-) (limited to 'autoscripts') diff --git a/autoscripts/postinst-init b/autoscripts/postinst-init index 6a1c5727..2430b2c0 100644 --- a/autoscripts/postinst-init +++ b/autoscripts/postinst-init @@ -1,8 +1,4 @@ if [ -x "/etc/init.d/#SCRIPT#" ]; then update-rc.d #SCRIPT# #INITPARMS# >/dev/null - 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 + invoke-rc.d #SCRIPT# start || #ERROR_HANDLER# fi diff --git a/autoscripts/postinst-init-restart b/autoscripts/postinst-init-restart index ba4b3a02..35bba207 100644 --- a/autoscripts/postinst-init-restart +++ b/autoscripts/postinst-init-restart @@ -5,9 +5,5 @@ if [ -x "/etc/init.d/#SCRIPT#" ]; then else _dh_action=start fi - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d #SCRIPT# $_dh_action || #ERROR_HANDLER# - else - /etc/init.d/#SCRIPT# $_dh_action || #ERROR_HANDLER# - fi + invoke-rc.d #SCRIPT# $_dh_action || #ERROR_HANDLER# fi diff --git a/autoscripts/prerm-init b/autoscripts/prerm-init index 96d37558..2a8aa4c6 100644 --- a/autoscripts/prerm-init +++ b/autoscripts/prerm-init @@ -1,7 +1,3 @@ if [ -x "/etc/init.d/#SCRIPT#" ]; then - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d #SCRIPT# stop || #ERROR_HANDLER# - else - /etc/init.d/#SCRIPT# stop || #ERROR_HANDLER# - fi + invoke-rc.d #SCRIPT# stop || #ERROR_HANDLER# fi diff --git a/autoscripts/prerm-init-norestart b/autoscripts/prerm-init-norestart index 9b631748..cacde6e3 100644 --- a/autoscripts/prerm-init-norestart +++ b/autoscripts/prerm-init-norestart @@ -1,7 +1,3 @@ if [ -x "/etc/init.d/#SCRIPT#" ] && [ "$1" = remove ]; then - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d #SCRIPT# stop || #ERROR_HANDLER# - else - /etc/init.d/#SCRIPT# stop || #ERROR_HANDLER# - fi + invoke-rc.d #SCRIPT# stop || #ERROR_HANDLER# fi -- cgit v1.2.3