Skip to content

Commit

Permalink
use grep -c
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrfai committed May 19, 2020
1 parent d917c4b commit c08b012
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/fai-make-nfsroot
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ check_nfsroot() {
$ROOTCMD dpkg-query -W -f='${Package;-18} ${Version}\n' fai-client fai-nfsroot fai-setup-storage dracut-network dracut dracut-live dracut-squash 2>/dev/null

# check if all important packages are installed
n=$($ROOTCMD dpkg-query -l fai-client fai-nfsroot fai-setup-storage dracut-network dracut 2>/dev/null|grep -E ^ii |wc -l)
n=$($ROOTCMD dpkg-query -l fai-client fai-nfsroot fai-setup-storage dracut-network dracut 2>/dev/null|grep -c -E ^ii)
if [ $n -ne 5 ]; then
echo "ERROR: Some essential pacakges are missing."
bad_exit
Expand Down

0 comments on commit c08b012

Please sign in to comment.