From 7adf2c71251abac86b93cbd21914acccac295575 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 29 Dec 2021 18:42:03 +0000 Subject: [PATCH] debian: Use debhelper to generate maint scripts Use #DEBHELPER#. That generates all the necessary boilerplate - and more modern boilerplate, too. We need a new Pre-Depends on init-system-helpers. Addresses this lintian warning https://lintian.debian.org/tags/maintainer-script-lacks-debhelper-token Signed-off-by: Ian Jackson --- debian/control | 1 + debian/postinst | 8 +------- debian/postrm | 5 +---- debian/prerm | 10 +--------- 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/debian/control b/debian/control index 47f9d3e..00f92b3 100644 --- a/debian/control +++ b/debian/control @@ -8,6 +8,7 @@ Standards-Version: 3.9.1 Package: userv Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base +Pre-Depends: ${misc:Pre-Depends} Description: `user services' - program call across trust boundaries userv allows one program to invoke another when only limited trust exists between them. It is a tool which can be used to avoid having diff --git a/debian/postinst b/debian/postinst index a6879b9..ec73b41 100644 --- a/debian/postinst +++ b/debian/postinst @@ -1,9 +1,3 @@ #!/bin/sh set -e -update-rc.d userv defaults 19 50 > /dev/null - -if command -v invoke-rc.d >/dev/null 2>&1; then - invoke-rc.d userv start -else - /etc/init.d/userv start -fi +#DEBHELPER# diff --git a/debian/postrm b/debian/postrm index 9072e11..ec73b41 100644 --- a/debian/postrm +++ b/debian/postrm @@ -1,6 +1,3 @@ #!/bin/sh set -e -if test "$1" = purge -then - update-rc.d userv remove >/dev/null -fi +#DEBHELPER# diff --git a/debian/prerm b/debian/prerm index 0be459b..ec73b41 100644 --- a/debian/prerm +++ b/debian/prerm @@ -1,11 +1,3 @@ #!/bin/sh set -e -if command -v invoke-rc.d >/dev/null 2>&1; then - invoke-rc.d userv stop -else - /etc/init.d/userv stop -fi - -if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/userv ]; then - rm -f /usr/doc/userv -fi +#DEBHELPER# -- 2.30.2