From 65d46518c06810d2dedb9a4d104e0441b5f04e2f Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Mon, 13 Feb 2012 20:33:59 -0800 Subject: [PATCH] Don't crash if we can't uninstall kernel. --- util/install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/install.sh b/util/install.sh index 00ecc7d..79943ab 100755 --- a/util/install.sh +++ b/util/install.sh @@ -64,7 +64,7 @@ fi DIST_LC=`echo $DIST | tr [A-Z] [a-z]` # as lower case # Kernel Deb pkg to be removed: -KERNEL_IMAGE_OLD=linux-image-2.6.26-2-686 +KERNEL_IMAGE_OLD=linux-image-2.6.26-33-generic DRIVERS_DIR=/lib/modules/${KERNEL_NAME}/kernel/drivers/net @@ -111,7 +111,9 @@ function kernel_clean { echo "Cleaning kernel..." # To save disk space, remove previous kernel - $remove $KERNEL_IMAGE_OLD + if ! $remove $KERNEL_IMAGE_OLD; then + echo $KERNEL_IMAGE_OLD not installed. + endif # Also remove downloaded packages: rm -f ~/linux-headers-* ~/linux-image-*