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