# vim:set ts=2 sw=2 ft=sh et: _warning_msg() { # compute the kernel version from the package version local kver=${1%-*} local kver=${kver/_/-}-seblu # advertise if you update the current running kernel if [[ "$kver" == "$(uname -r)" ]]; then echo '********************************************************************************' echo '********************************************************************************' echo "****** YOU HAVE ${2^^} THE CURRENTLY RUNNING KERNEL ** REBOOT IMMEDIATLY ******" echo '********************************************************************************' echo '********************************************************************************' fi } # arg 1: the new package version # arg 2: the old package version post_upgrade() { _warning_msg "$2" 'updated' } # arg 1: the old package version post_remove() { _warning_msg "$1" 'removed' }