From 34f313e1d3def931b8cb7a49cf6859082a0143ce Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 31 Oct 2021 07:48:10 +0100 Subject: Replacing which with command in maintainer scripts. Signed-off-by: Daniel Baumann --- debian/open-infrastructure-system-boot.postinst | 7 +++++-- debian/open-infrastructure-system-boot.postrm | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/debian/open-infrastructure-system-boot.postinst b/debian/open-infrastructure-system-boot.postinst index 35b9e86..3ff8751 100755 --- a/debian/open-infrastructure-system-boot.postinst +++ b/debian/open-infrastructure-system-boot.postinst @@ -6,9 +6,12 @@ case "${1}" in configure) mkdir -p /etc/live/boot - if [ -x "$(which update-initramfs 2>/dev/null)" ] && [ -e /etc/initramfs-tools/initramfs.conf ] + if command -v update-initramfs > /dev/null 2>&1 then - update-initramfs -u + if [ -e /etc/initramfs-tools/initramfs.conf ] + then + update-initramfs -u + fi fi ;; diff --git a/debian/open-infrastructure-system-boot.postrm b/debian/open-infrastructure-system-boot.postrm index 5c7cdf7..a8b2d76 100755 --- a/debian/open-infrastructure-system-boot.postrm +++ b/debian/open-infrastructure-system-boot.postrm @@ -7,9 +7,12 @@ case "${1}" in rmdir --ignore-fail-on-non-empty /etc/live/boot > /dev/null 2>&1 || true rmdir --ignore-fail-on-non-empty /etc/live > /dev/null 2>&1 || true - if [ -x "$(which update-initramfs 2>/dev/null)" ] && [ -e /etc/initramfs-tools/initramfs.conf ] + if command -v update-initramfs > /dev/null 2>&1 then - update-initramfs -u + if [ -e /etc/initramfs-tools/initramfs.conf ] + then + update-initramfs -u + fi fi ;; -- cgit v1.2.3