diff options
Diffstat (limited to 'autoscripts')
-rw-r--r-- | autoscripts/postinst-init | 6 | ||||
-rw-r--r-- | autoscripts/postinst-init-norestart | 9 | ||||
-rw-r--r-- | autoscripts/prerm-init | 4 | ||||
-rw-r--r-- | autoscripts/prerm-init-norestart | 2 |
4 files changed, 16 insertions, 5 deletions
diff --git a/autoscripts/postinst-init b/autoscripts/postinst-init index 976c6b34..5ef99c7c 100644 --- a/autoscripts/postinst-init +++ b/autoscripts/postinst-init @@ -1,2 +1,4 @@ -update-rc.d #SCRIPT# #INITPARMS# >/dev/null -/etc/init.d/#SCRIPT# start +if [ -e "#SCRIPT#" ]; then + update-rc.d #SCRIPT# #INITPARMS# >/dev/null + /etc/init.d/#SCRIPT# start +fi diff --git a/autoscripts/postinst-init-norestart b/autoscripts/postinst-init-norestart index 05357d07..d57bfc09 100644 --- a/autoscripts/postinst-init-norestart +++ b/autoscripts/postinst-init-norestart @@ -1 +1,8 @@ -update-rc.d #SCRIPT# #INITPARMS# >/dev/null +if [ -e "#SCRIPT#" ]; then + update-rc.d #SCRIPT# #INITPARMS# >/dev/null + if [ "$1" = "configure" ]; then + if [ -z "$2" -o "$2" = "<unknown>" ]; then + /etc/init.d/#SCRIPT# start + fi + fi +fi diff --git a/autoscripts/prerm-init b/autoscripts/prerm-init index 64975a38..260d69d9 100644 --- a/autoscripts/prerm-init +++ b/autoscripts/prerm-init @@ -1 +1,3 @@ -/etc/init.d/#SCRIPT# stop +if [ -e "#SCRIPT#" ]; then + /etc/init.d/#SCRIPT# stop +fi diff --git a/autoscripts/prerm-init-norestart b/autoscripts/prerm-init-norestart index ec9820f8..e04ec25a 100644 --- a/autoscripts/prerm-init-norestart +++ b/autoscripts/prerm-init-norestart @@ -1,3 +1,3 @@ -if [ "$1" = remove ]; then +if [ -e "#SCRIPT#" -a "$1" = remove ]; then /etc/init.d/#SCRIPT# stop fi |