=================================================================== RCS file: /cvs/openbsd/update_openbsd/update_openbsd,v retrieving revision 1.47 retrieving revision 1.51 diff -u -r1.47 -r1.51 --- openbsd/update_openbsd/update_openbsd 2012/12/16 06:56:15 1.47 +++ openbsd/update_openbsd/update_openbsd 2013/10/20 01:23:05 1.51 @@ -1,5 +1,5 @@ #!/bin/sh -# $AFresh1: update_openbsd,v 1.46 2012/12/16 03:29:02 andrew Exp $ +# $AFresh1: update_openbsd,v 1.50 2013/10/20 00:18:04 andrew Exp $ # # Copyright (c) 2012 Andrew Fresh # @@ -185,6 +185,10 @@ # We want to default to what we had INSTALL_KERNELS="${BOOT_KERNEL#/}" + # if the boot kernel was our specially named bsd.sp, we install from bsd + if [ X"$INSTALL_KERNELS" == X"bsd.sp" ]; then + INSTALL_KERNELS="bsd" + fi # with a second option of an mp kernel if is is a likely candidate if [ X"$INSTALL_KERNELS" != X"bsd.mp" ]; then local _ncpu=$(sysctl -n hw.ncpufound) @@ -392,15 +396,6 @@ local _v=$FILE_VER - if [ $CUR_VER != $NEW_VER -a ! -e /sbin/oreboot ]; then - $SUDO cp /sbin/reboot /sbin/oreboot - if [ $? -ne 0 ]; then - echo "Error copying old reboot command!" >&2 - exit 1 - fi - echo "/sbin/reboot copied to /sbin/oreboot" - fi - local _sets=`ls *${_v}.tgz | grep -v ^base ` for _f in ${_sets} base${_v}.tgz; do _path=$DESTDIR @@ -420,7 +415,9 @@ done echo Extracted all sets. +} +install_sendmail_smtp_auth() { if [ -e ${RELEASEDIR}/sendmail-smtp_auth.gz ]; then gzcat ${RELEASEDIR}/sendmail-smtp_auth.gz > \ ${RELEASEDIR}/sendmail-smtp_auth @@ -554,10 +551,22 @@ $SUDO -v -p "sudo Password: " fi +if [ X"$BOOT_KERNEL_VERSION" != X"$BOOTED_KERNEL_VERSION" \ + -a ! -e /sbin/oreboot ]; then + $SUDO cp /sbin/reboot /sbin/oreboot + if [ $? -ne 0 ]; then + echo "Error copying old reboot command!" >&2 + exit 1 + fi + echo "/sbin/reboot copied to /sbin/oreboot" +fi + install_kernels install_sets -if [ $CUR_VER == $NEW_VER ]; then +if [ X"$BOOT_KERNEL_VERSION" == X"$BOOTED_KERNEL_VERSION" ]; then + install_sendmail_smtp_auth + if [ -e /sbin/oreboot ]; then echo Removing /sbin/oreboot $SUDO rm -f /sbin/oreboot