From 2d44f002c25cff5905099a3c4027b0c3e3ad4a2e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 11 Apr 2021 16:36:05 +0200 Subject: Using which to check for commands in maintainer script to avoid lintian 'command-with-path'-warning. Signed-off-by: Daniel Baumann --- debian/open-infrastructure-container-tools.config | 2 +- debian/open-infrastructure-container-tools.postinst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/open-infrastructure-container-tools.config b/debian/open-infrastructure-container-tools.config index 0c694fa..514d1bb 100644 --- a/debian/open-infrastructure-container-tools.config +++ b/debian/open-infrastructure-container-tools.config @@ -35,7 +35,7 @@ then SCRIPT_CHOICES="$(cd /usr/share/compute-tools/scripts && find -maxdepth 1 -not -type d -and -not -name 'default' -and -not -name 'debconf' -and -not -name '*.d' -printf '%P\n' | sort)" db_subst open-infrastructure-container-tools/script SCRIPT_CHOICES "$(echo ${SCRIPT_CHOICES} | sed -e 's| |, |g')" - if [ -x /usr/bin/lsb_release ] + if [ -x "$(which lsb_release)" ] then DISTRIBUTOR="$(lsb_release -is 2>/dev/null)" fi diff --git a/debian/open-infrastructure-container-tools.postinst b/debian/open-infrastructure-container-tools.postinst index 1cac16a..44d0582 100755 --- a/debian/open-infrastructure-container-tools.postinst +++ b/debian/open-infrastructure-container-tools.postinst @@ -108,7 +108,7 @@ EOF mv -f "${CONFFILE}.tmp" "${CONFFILE}" - if [ -x /sbin/sysctl ] + if [ -x "$(which sysctl)" ] then sysctl -q -p /etc/sysctl.d/zz-container.conf fi -- cgit v1.2.3