function ckcmd() {
cmd=$2;
- idle-exec-command $1 $cmd > /dev/null 2>&1;
- if [ $? -eq 0 ]; then echo -e "${1}: $2 ${GREEN}${YES}${ENDCOLOR}";
+ idle-exec-command $1 test -f /usr/bin/$cmd > /dev/null 2>&1;
+ usrBinTest=$?
+ idle-exec-command $1 test -f /bin/$cmd > /dev/null 2>&1;
+ binTest=$?;
+ idle-exec-command $1 test -f /usr/sbin/$cmd > /dev/null 2>&1;
+ sbinTest=$?;
+ result=$((usrBinTest * binTest * sbinTest));
+ if [ $result -eq 0 ]; then echo -e "${1}: $2 ${GREEN}${YES}${ENDCOLOR}";
else echo -e "${1}: $2 ${RED}${NO}${ENDCOLOR}";
fi
}