-
-
Save xurizaemon/a53f3c93d1c75b0d51aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INSTALLED_VERSION=$(dpkg -s libc6 | grep Version | awk '{ print $2 }') | |
DEBIAN_RELEASE=$(lsb_release -sr | cut -c 1) | |
case $DEBIAN_RELEASE in | |
6) | |
FIXED_VERSION=2.11.3-4+deb6u4 ;; | |
7) | |
FIXED_VERSION=2.13-38+deb7u7 ;; | |
8) | |
FIXED_VERSION=2.19-13 ;; | |
esac | |
dpkg --compare-versions $INSTALLED_VERSION ge $FIXED_VERSION | |
if [ ! $? -eq 0 ] ; then | |
echo Installed is $INSTALLED_VERSION, should be $FIXED_VERSION | |
exit 2 | |
else | |
echo Installed is $INSTALLED_VERSION, looks OK. | |
exit 0 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RH_VER=$(cat /etc/redhat-release | cut -d " " -f 3 | cut -d "." -f 1 ) | |
if [ "$RH_VER" == "5" ]; then | |
GOOD_VER="glibc-2.5-123.el5_11.1" | |
fi | |
if [ "$RH_VER" == "6" ] || [ "$RH_VER" == "7" ]; then | |
GOOD_VER="glibc-2.12-1.149.el6_6.5" | |
fi | |
CURRENT_VERSION=$(rpm -qa | grep glibc-2 | cut -d "." -f -5) | |
if [ "$CURRENT_VERSION" != "$GOOD_VER" ]; then | |
echo "CURRENT VERSION IS $CURRENT_VERSION - SHOULD BE $GOOD_VER" | |
exit 2 | |
else | |
echo "CURRENT VERSION ( $CURRENT_VERSION ) IS OK" | |
exit 0 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment