Skip to content

Commit

Permalink
replace which with command -v
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrfai committed Jun 30, 2023
1 parent ba94b5a commit 640a2a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/fai-divert
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ exit 0
[ "$1" ] || usage

# do not execute if command is not available
if ! $ROOTCMD which dpkg-divert >/dev/null 2>&1 ; then
if ! $ROOTCMD bash -c "command -v dpkg-divert >/dev/null" ; then
exit 0
fi

Expand Down
2 changes: 1 addition & 1 deletion lib/task_sysinfo
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fi
# first show some hardware info
echo Showing system information.

# too much details [ -x "$(which dmidecode)" ] && dmidecode
# too much details [ -x "$(command -v dmidecode >&/dev/null)" ] && dmidecode
(
cd /sys/class/dmi/id || exit
grep . {board_,bios_,product_}* 2>/dev/null| sed -e 's/:/: /'| grep -E -iv '123456789|To Be Filled|: Not |N/A|:[[:blank:]]+$'
Expand Down

0 comments on commit 640a2a2

Please sign in to comment.