3.0-RELEASE and now the post-release 3.0-CURRENT were being declared

'too old' to run ELF.  Check the kernel version properly.
This commit is contained in:
Peter Wemm 1998-10-17 05:40:46 +00:00
parent 7b955a8e5d
commit da942c6108
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40467
2 changed files with 16 additions and 7 deletions

View File

@ -1,5 +1,5 @@
#
# $Id: Makefile.upgrade,v 1.5 1998/09/09 06:02:31 jb Exp $
# $Id: Makefile.upgrade,v 1.6 1998/09/23 01:46:25 jb Exp $
#
# This makefile contains rules for preforming upgrades that are outside
# the scope of the normal build world process.
@ -15,7 +15,8 @@ MAKEOBJDIRPREFIX?=/usr/obj
# The installed operating system release gives us the hint as to whether
# we need to build a kernel too.
#
INSTALLEDVERSION!=uname -r
INSTALLEDVERSION!=sh ${.CURDIR}/tools/tools/upgrade/getosreldate.sh
INSTALLEDNAME!=uname -r
#
# Upgrade the installed make to the current version using the installed
@ -165,7 +166,7 @@ ${MAKEOBJDIRPREFIX}/do_aout_installworld :
@echo "--------------------------------------------------------------"
@/bin/sh -c "read -p \"Return to continue or Ctrl-C to abort: \" _e"
.endif
.if ${INSTALLEDVERSION} != "3.0-BETA"
.if ${INSTALLEDVERSION} < 300003
@echo
@echo "--------------------------------------------------------------"
@echo " Saving a copy of programs required to shut the system down"
@ -191,10 +192,10 @@ ${MAKEOBJDIRPREFIX}/do_aout_installworld :
# directory as an obscure name just in case a reboot is required?
#
${MAKEOBJDIRPREFIX}/do_aout_kernel :
.if ${INSTALLEDVERSION} == "3.0-BETA"
.if ${INSTALLEDVERSION} >= 300003
@echo
@echo "--------------------------------------------------------------"
@echo " You are already running 3.0-BETA, so a kernel build"
@echo " You are already running 3.0, so a kernel build"
@echo " is probably not required."
@echo "--------------------------------------------------------------"
.else
@ -258,7 +259,7 @@ ${MAKEOBJDIRPREFIX}/do_set_objformat :
# and reboot.
#
${MAKEOBJDIRPREFIX}/do_install_kernel_reboot :
.if ${INSTALLEDVERSION} == "3.0-BETA"
.if ${INSTALLEDVERSION} >= 300003
@echo
@echo "--------------------------------------------------------------"
@echo " Your system has been updated to run elf by default!"
@ -272,7 +273,7 @@ ${MAKEOBJDIRPREFIX}/do_install_kernel_reboot :
@echo "--------------------------------------------------------------"
@echo " Your system has been updated to run elf by default!"
@echo
@echo " Since you are running ${INSTALLEDVERSION}, the kernel must"
@echo " Since you are running ${INSTALLEDNAME}, the kernel must"
@echo " be installed before the system is rebooted. You can type"
@echo " Ctrl-C to abort the kernel installation (at your own risk),"
@echo " or press return for the kernel to be installed and the"

View File

@ -0,0 +1,8 @@
#! /bin/sh
# $Id$
RELDATE=`sysctl -n kern.osreldate 2>/dev/null`
if [ "x$RELDATE" = x ]; then
RELDATE=200000 # assume something really old
fi
echo $RELDATE