From 78220ab3ea9b0df34e9e02016d0487e60e3662d6 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 5 Jan 2012 10:41:50 +0000 Subject: [PATCH] maintainer scripts: use invoke-rc.d instead of directly invoking init script Addressing lintian errors: | E: ngcp-mediaproxy-ng-kernel-dkms: maintainer-script-calls-init-script-directly postinst:22 | E: ngcp-mediaproxy-ng-kernel-dkms: maintainer-script-calls-init-script-directly prerm:12 From: Michael Prokop --- debian/ngcp-mediaproxy-ng-kernel-dkms.postinst | 2 +- debian/ngcp-mediaproxy-ng-kernel-dkms.prerm | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/ngcp-mediaproxy-ng-kernel-dkms.postinst b/debian/ngcp-mediaproxy-ng-kernel-dkms.postinst index eb4fd74..66de723 100644 --- a/debian/ngcp-mediaproxy-ng-kernel-dkms.postinst +++ b/debian/ngcp-mediaproxy-ng-kernel-dkms.postinst @@ -19,7 +19,7 @@ if [ "$1" = 'configure' ] ; then # try to start the daemon if [ -x /etc/init.d/ngcp-mediaproxy-ng-daemon ] ; then - /etc/init.d/ngcp-mediaproxy-ng-daemon start || true + invoke-rc.d ngcp-mediaproxy-ng-daemon start || true fi fi diff --git a/debian/ngcp-mediaproxy-ng-kernel-dkms.prerm b/debian/ngcp-mediaproxy-ng-kernel-dkms.prerm index d7240ae..61a0200 100644 --- a/debian/ngcp-mediaproxy-ng-kernel-dkms.prerm +++ b/debian/ngcp-mediaproxy-ng-kernel-dkms.prerm @@ -9,7 +9,9 @@ version=`dpkg-query -W -f='${Version}' "$package" \ |rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n"` # make sure it's not running -/etc/init.d/ngcp-mediaproxy-ng-daemon stop || true +if [ -x /etc/init.d/ngcp-mediaproxy-ng-daemon ] ; then + invoke-rc.d ngcp-mediaproxy-ng-daemon stop || true +fi dkms remove -m "$name" -v "$version" --all || true