# HG changeset patch # User Dirk Olmes # Date 1608635002 -3600 # Node ID 249b37a8c9179e9e50c6c3e509f10cdb1e289ae4 # Parent d74e3821363e59e059392349df7b338da4cd7f52 Fix fuer Kernel Versionen mit Revision diff -r d74e3821363e -r 249b37a8c917 removeKernel --- a/removeKernel Sat Aug 08 11:40:20 2020 +0200 +++ b/removeKernel Tue Dec 22 12:03:22 2020 +0100 @@ -19,7 +19,7 @@ FULL_VERSION="${MAJOR}.${MINOR}.${MICRO}" if [[ "${REVISION}" != "" ]]; then - FULL_VERSION=$"{FULL_VERSION}-${REVISION}" + FULL_VERSION="${FULL_VERSION}-${REVISION}" fi ARCH=`uname -m` @@ -38,8 +38,11 @@ # unmerge the kernel cd /usr/src -KERNEL_DIR="linux-${FULL_VERSION}${KERNEL_FLAVOR}" -if [ -d $KERNEL_DIR ]; then +KERNEL_DIR="linux-${MAJOR}.${MINOR}.${MICRO}${KERNEL_FLAVOR}" +if [[ "${REVISION}" != "" ]]; then + KERNEL_DIR="${KERNEL_DIR}-${REVISION}" +fi +if [[ -d $KERNEL_DIR ]]; then KERNEL_NAME="${KERNEL_EBUILD}-${FULL_VERSION}" echo "unmerge kernel $KERNEL_NAME" >> $LOGFILE 2>&1