From da942c61084a9fe100d6591eb495b8c9e058fcec Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sat, 17 Oct 1998 05:40:46 +0000 Subject: [PATCH] 3.0-RELEASE and now the post-release 3.0-CURRENT were being declared 'too old' to run ELF. Check the kernel version properly. --- Makefile.upgrade | 15 ++++++++------- tools/tools/upgrade/getosreldate.sh | 8 ++++++++ 2 files changed, 16 insertions(+), 7 deletions(-) create mode 100755 tools/tools/upgrade/getosreldate.sh diff --git a/Makefile.upgrade b/Makefile.upgrade index ba8018e63c54..4e7b7ffc32e8 100644 --- a/Makefile.upgrade +++ b/Makefile.upgrade @@ -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" diff --git a/tools/tools/upgrade/getosreldate.sh b/tools/tools/upgrade/getosreldate.sh new file mode 100755 index 000000000000..cb23ef310d12 --- /dev/null +++ b/tools/tools/upgrade/getosreldate.sh @@ -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