You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
887 B
37 lines
887 B
12 months ago
|
#!/bin/bash
|
||
|
# Author: Iain Douglas <centos@1n6.org.uk>
|
||
|
# Author: Rene Diepstraten <rene@renediepstraten.nl>
|
||
|
# Christoph Galuschka <tigalch@tigalch.org>
|
||
|
#
|
||
|
# Check the binaries from the package exist and run ok
|
||
|
|
||
|
function ExitFail {
|
||
|
t_Log "Fail"
|
||
|
exit $FAIL
|
||
|
}
|
||
|
|
||
|
if [ $centos_ver -lt 6 ]
|
||
|
then
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
t_Log "Checking binaries are present and run on C6/C7"
|
||
|
|
||
|
if [ $centos_ver -ge 7 ]
|
||
|
then
|
||
|
[ "$(readlink -e /usr/bin/gunzip)" == "/usr/bin/gunzip" ] || ExitFail
|
||
|
[ "$(readlink -e /usr/bin/gzip)" == "/usr/bin/gzip" ] || ExitFail
|
||
|
elif [ $centos_ver == 6 ]
|
||
|
then
|
||
|
[ "$(readlink -e /bin/gunzip)" == "/bin/gunzip" ] || ExitFail
|
||
|
[ "$(readlink -e /bin/gzip)" == "/bin/gzip" ] || ExitFail
|
||
|
fi
|
||
|
|
||
|
for binary in gunzip gzip zcat gzexe zcmp zdiff zegrep zfgrep zforce zgrep zless zmore znew
|
||
|
do
|
||
|
echo -n "$binary "
|
||
|
$binary --version &>/dev/null || ExitFail
|
||
|
done
|
||
|
echo ""
|
||
|
t_Log "PASS"
|