Replace 'which' with 'command -v'

Cf. https://lwn.net/Articles/874049/
This commit is contained in:
Arnaud Rebillout
2023-03-03 10:06:43 +07:00
parent 2be92c7e69
commit 45012e2d47
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -160,11 +160,11 @@ if [ "$1" = "configure" ]; then
sed -i 's/grub-16x9\.png/grub-4x3.png/' /boot/grub/themes/kali/theme.txt
fi
# Rebuild the grub configuration with our config changes
if which update-grub >/dev/null; then
if command -v update-grub >/dev/null; then
update-grub || true
fi
# Rebuild the initrd for plymouth
if which update-initramfs >/dev/null; then
if command -v update-initramfs >/dev/null; then
update-initramfs -u
fi
fi