From d929eff67f9d211839b01994f3a990da47557c9c Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Thu, 30 Sep 2010 13:34:09 +0000 Subject: [PATCH] Changes from alex validated git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@722 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- contrib/DEBIAN/postrm | 7 ++++++- contrib/DEBIAN/prerm | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/contrib/DEBIAN/postrm b/contrib/DEBIAN/postrm index 59b1d2d31..dbc380760 100755 --- a/contrib/DEBIAN/postrm +++ b/contrib/DEBIAN/postrm @@ -1,6 +1,7 @@ #!/bin/sh -set -e +set -e # required by lintian +set +e # Don't know how to check presence of fhem in passwd with -e if grep -q fhem /etc/passwd; then userdel fhem @@ -13,3 +14,7 @@ if test -f /etc/init.d/fhem; then update-rc.d fhem remove rm /etc/init.d/fhem fi + +if test ! -x /sbin/initctl; then + update-rc.d -f fhem remove +fi diff --git a/contrib/DEBIAN/prerm b/contrib/DEBIAN/prerm index f5d3f8c1d..b86f7bb52 100755 --- a/contrib/DEBIAN/prerm +++ b/contrib/DEBIAN/prerm @@ -3,9 +3,9 @@ set -e if pgrep fhem.pl >/dev/null; then - if test -x /sbin/initctl; then - initctl stop fhem - else - invoke-rc.d fhem stop - fi + if test -x /sbin/initctl; then + initctl stop fhem + else + invoke-rc.d fhem stop + fi fi