Skip to content

Commit

Permalink
Replace whereis with type in zfs-lib.sh
Browse files Browse the repository at this point in the history
The whereis command should not be used since it may not exist
in the initramfs.  The dracut plymouth module also uses the type
command instead of whereis.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Garrett Fields <ghfields@gmail.com>
Signed-off-by: Dacian Reece-Stremtan <dacianstremtan@gmail.com>
Closes openzfs#8920
Closes openzfs#8938
  • Loading branch information
dacianstremtan authored and tonyhutter committed Aug 23, 2019
1 parent 929edb1 commit c7209d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/dracut/90zfs/zfs-lib.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ ask_for_password() {

{ flock -s 9;
# Prompt for password with plymouth, if installed and running.
if whereis plymouth >/dev/null 2>&1 && plymouth --ping 2>/dev/null; then
if type plymouth >/dev/null 2>&1 && plymouth --ping 2>/dev/null; then
plymouth ask-for-password \
--prompt "$ply_prompt" --number-of-tries="$ply_tries" \
--command="$ply_cmd"
Expand Down

0 comments on commit c7209d8

Please sign in to comment.