=================================================================== RCS file: /cvs/openbsd/update_openbsd/update_openbsd,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- openbsd/update_openbsd/update_openbsd 2009/04/25 01:14:12 1.20 +++ openbsd/update_openbsd/update_openbsd 2009/05/13 05:26:32 1.21 @@ -1,5 +1,5 @@ #!/bin/sh -# $RedRiver: update_openbsd,v 1.19 2009/03/14 01:09:23 andrew Exp $ +# $RedRiver: update_openbsd,v 1.20 2009/04/25 00:14:12 andrew Exp $ installed_sets() { local misc=/usr/share/doc/README @@ -283,16 +283,11 @@ fi local _v=$FILE_VER - if [ -e base${_v}.tgz ]; then - echo Extracting new firmware and ifconfig from base${_v}.tgz - $SUDO tar -C $DESTDIR -xzphf base${_v}.tgz \ - ./etc/firmware ./sbin/ifconfig - fi $SUDO rm -f /obsd $SUDO ln /bsd /obsd if [ $? -ne 0 ]; then - echo "Error copying old kernel!" + echo "Error copying old kernel!" >&2 exit 1 fi @@ -349,13 +344,21 @@ local _v=$FILE_VER - for _f in *${_v}.tgz; do + 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 if [ X"etc${_v}.tgz" == X"$_f" \ -o X"xetc${_v}.tgz" == X"$_f" ]; then - if [ X"" != X"$SYSMERGE" ]; then - continue - fi + [ X"" != X"$SYSMERGE" ] && continue _path=/var/tmp/temproot fi @@ -375,9 +378,13 @@ ${RELEASEDIR}/sendmail-smtp_auth fi if [ -e ${RELEASEDIR}/sendmail-smtp_auth ]; then - install -o root -g smmsp -m 2555 \ + if ! pkg_info -qe 'cyrus-sasl-*'; then + $SUDO pkg_add -i cyrus-sasl + fi + + $SUDO install -o root -g smmsp -m 2555 \ ${RELEASEDIR}/sendmail-smtp_auth \ - /usr/local/libexec/sendmail/sendmail + /usr/libexec/sendmail/sendmail echo Installed sendmail with smtp_auth fi @@ -453,7 +460,7 @@ INSTALLED_SETS=${INSTALLED_SETS:=`installed_sets`} -CHECKSUM_TYPES=${CHECKSUM_TYPE:=SHA256 MD5} +CHECKSUM_TYPES=${CHECKSUM_TYPES:=SHA256 MD5} set_version local _error=$? @@ -491,9 +498,13 @@ fi install_kernel +install_sets if [ $CUR_VER == $NEW_VER ]; then - install_sets + if [ -e /sbin/oreboot ]; then + echo Removing /sbin/oreboot + $SUDO rm -f /sbin/oreboot + fi update_etc echo '### UPDATING PACKAGES ###'