From: Valentin Vidic Date: Thu, 4 Sep 2008 10:55:05 +0000 (+0200) Subject: Added check for grsec kernel version. X-Git-Tag: debian/4.0.6~6 X-Git-Url: http://ftp.carnet.hr/pub/carnet-debian/scm?a=commitdiff_plain;h=7bf6d65fccb92a509ce93595e5de2e2dc675cd6b;p=carnet-upgrade.git Added check for grsec kernel version. --- diff --git a/src/actions/main.queue b/src/actions/main.queue index 7e8ae18..0335654 100644 --- a/src/actions/main.queue +++ b/src/actions/main.queue @@ -2,6 +2,7 @@ true first_warning true check_apache_version true check_upgrade +true check_grsec_kernel pkg xlibs remove_x true remove_bloat true apt_listchanges disable diff --git a/src/functions.sh b/src/functions.sh index cbb7d61..fc5e65d 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -340,6 +340,32 @@ Nakon toga ponovno pozovite ovu skriptu." fi } +# if grsec is installed make sure it is fresh +check_grsec_kernel () { + local ver=`uname -r` + + log "Kernel version: $ver" + if [ "$ver" = "${ver%-grsec}" ]; then + # not grsec variant + return 0 + fi + + if [ "$ver" = "${ver#2.6.2[2-9]}" ]; then + # kernel too old + notice " +Prije prelaska na Debian Etch potrebno je napraviti nadogradnju na najnoviji grsec kernel. + +Pokrenite: + # apt-get update + # apt-get install kernel-2.6-cn + # reboot + +Nakon toga ponovno pozovite ovu skriptu." + log "carnet-upgrade aborted, kernel upgrade needed." + exit 1 + fi +} + upgrade () { local i to_install packages case "$1" in