#!/bin/bash #$Id: check-compat32,v 1.2 2019/12/12 20:49:51 eha Exp eha $ # # Purpose: # To check if any of the installed -compat32 packages is older than # the accompanying 64-bit package. # # Author: # Eric Hameleers # # No verbose output by default: DEBUG=0 showhelp () { cat <> Found '$PKG32'..." PKG64=$(echo ${FULL32} |cut -f5 -d'/' |rev |cut -f5- -d'-' |rev) # Differentiate between eg. 'openssl' and 'openssl-solibs': VER64=$( for PACK in $(find /var/log/packages/ -name "${PKG64}-*" |grep -v -- -compat32) ; do if [ "$(echo $PACK |cut -f5 -d'/' |rev |cut -f4- -d'-' |rev)" = "${PKG64}" ]; then echo $(echo $PACK |cut -f5 -d'/' | rev | cut -f3 -d'-' |rev) ; fi ; done ) # Issue a warning if the version of the 64-bit package differs: if [ -n "$VER64" -a "$VER32" != "$VER64" ]; then echo "** Package '$PKG64' has version '$VER64' but package '$PKG32' has version '$VER32'" fi done [ $DEBUG -ne 0 ] && echo "-- Finished checking installed packages."