summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-05-27 14:01:20 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-05-27 14:01:20 +0000
commitc5dbe172e9b6f7f35f8b051062d9ef97d9fb89d9 (patch)
treef5a5bc0d1679c16857ed58535c85ce612105ade1
parent252041321d4ac8753e3083c71590291154dbe66e (diff)
downloaddrakx-c5dbe172e9b6f7f35f8b051062d9ef97d9fb89d9.tar
drakx-c5dbe172e9b6f7f35f8b051062d9ef97d9fb89d9.tar.gz
drakx-c5dbe172e9b6f7f35f8b051062d9ef97d9fb89d9.tar.bz2
drakx-c5dbe172e9b6f7f35f8b051062d9ef97d9fb89d9.tar.xz
drakx-c5dbe172e9b6f7f35f8b051062d9ef97d9fb89d9.zip
handle no kernel installed correctly
-rwxr-xr-xkernel/update_kernel3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/update_kernel b/kernel/update_kernel
index 5da807e71..9c2145e21 100755
--- a/kernel/update_kernel
+++ b/kernel/update_kernel
@@ -134,7 +134,8 @@ fi
[ -n "$main" -a -e $ALL_KERNELS/$main ] || {
cd $ALL_KERNELS
main=$(echo 2.6* | sed 's/.* //')
- [ -n "$main" ] || main=$(echo 2.4* | sed 's/.* //')
+ [ -e "$main" ] || main=$(echo 2.4* | sed 's/.* //')
+ [ -e "$main" ] || { echo "no kernel installed in $ALL_KERNELS"; exit 1; }
echo "Choosing $main"
echo $main > .main
cd ..