simplify command -v

This commit is contained in:
illiliti 2020-02-24 21:52:19 +03:00
parent 1edd4a1185
commit 40561d4c82
2 changed files with 4 additions and 4 deletions

View File

@ -157,8 +157,8 @@ case "$devmgr" in
esac
# TODO handle situations when LUKS on LVM
[ "$luks" = 1 ] && [ -x "$(command -v cryptsetup)" ] && unlock_luks
[ "$lvm" = 1 ] && [ -x "$(command -v lvm)" ] && trigger_lvm
[ "$luks" = 1 ] && command -v cryptsetup 2>&1 > /dev/null && unlock_luks
[ "$lvm" = 1 ] && command -v lvm 2>&1 > /dev/null && trigger_lvm
mnt_rootfs
[ "$debug" = 1 ] && panic "dropping to shell"
cleanup

View File

@ -442,8 +442,8 @@ case "$devmgr" in
*) msg panic "devmgr option broken" ;;
esac
[ "$lvm" = 1 ] && [ -x "$(command -v lvm)" ] && install_lvm
[ "$luks" = 1 ] && [ -x "$(command -v cryptsetup)" ] && install_luks
[ "$lvm" = 1 ] && command -v lvm 2>&1 > /dev/null && install_lvm
[ "$luks" = 1 ] && command -v cryptsetup 2>&1 > /dev/null && install_luks
install_files
create_initramfs