summaryrefslogtreecommitdiffstats
path: root/tmp
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-11-20 09:32:25 -0500
committerjim-p <jimp@pfsense.org>2012-11-20 09:45:15 -0500
commitbff167fd3510fe6e9948e80cd19ba30d299fffe3 (patch)
tree5559b5dd45e76576addc27aa420abcb0980f11ba /tmp
parentc0f613e29849bd929797d5005a45e281c05b7754 (diff)
downloadpfsense-bff167fd3510fe6e9948e80cd19ba30d299fffe3.zip
pfsense-bff167fd3510fe6e9948e80cd19ba30d299fffe3.tar.gz
Remove other potential places where someone could select a kernel we no longer ship. Try to improve kernel detection a little more.
Diffstat (limited to 'tmp')
-rwxr-xr-xtmp/post_upgrade_command10
1 files changed, 8 insertions, 2 deletions
diff --git a/tmp/post_upgrade_command b/tmp/post_upgrade_command
index c432988..634afb0 100755
--- a/tmp/post_upgrade_command
+++ b/tmp/post_upgrade_command
@@ -3,7 +3,13 @@
/etc/rc.conf_mount_rw
PFSENSETYPE=`cat /etc/platform`
-OLDKERNEL=`cat /boot/kernel/pfsense_kernel.txt`
+
+# check in two places for the old kernel type, since it could have been moved elsewhere in the upgrade process.
+if [ -f /boot/kernel/pfsense_kernel.txt ]; then
+ OLDKERNEL=`cat /boot/kernel/pfsense_kernel.txt`
+else
+ OLDKERNEL=`cat /tmp/pfsense_kernel.txt`
+fi
# Massage the existing kernel into one that actually exists.
# Leaving old entries so we can bring back other kernels later if desired.
@@ -32,7 +38,7 @@ esac
echo ${KERNELTYPE} > /boot/kernel/pfsense_kernel.txt
HAVE_KERNEL=false
-case "$KERNELTYPE" in
+case "${KERNELTYPE}" in
"wrap")
if [ -f /kernels/kernel_wrap.gz ]; then
HAVE_KERNEL=true
OpenPOWER on IntegriCloud