=================================================================== RCS file: /cvs/openbsd/update_openbsd/update_openbsd,v retrieving revision 1.68 retrieving revision 1.75 diff -u -r1.68 -r1.75 --- openbsd/update_openbsd/update_openbsd 2014/10/18 23:42:35 1.68 +++ openbsd/update_openbsd/update_openbsd 2015/05/03 00:27:01 1.75 @@ -1,5 +1,5 @@ #!/bin/sh -# $AFresh1: update_openbsd,v 1.67 2014/05/11 02:40:54 andrew Exp $ +# $AFresh1: update_openbsd,v 1.74 2015/03/21 22:50:18 andrew Exp $ # # Copyright (c) 2012 Andrew Fresh # @@ -27,10 +27,12 @@ local xserv=/usr/X11R6/bin/X local xshare=/usr/X11R6/bin/startx + local _nv=`echo $NEW_VER | sed -e 's/\.//'` local _c _d _e echo -n base - echo -n ' etc' + [ $_nv -lt 57 ] && echo -n ' etc' for _d in misc man comp game xbase xetc xfont xserv xshare; do + [ $_d = xetc -a $_nv -ge 57 ] && continue eval _e=\$${_d} _c=`ls $_e 2> /dev/null | wc -l` #echo $_c $_d $_e @@ -222,10 +224,14 @@ if [ ! -e ./${_b} ]; then echo "===> $FTP_CMD ${FTP}/${_b}" $FTP_CMD ${FTP}/${_b} + else + echo "===> Have ${_b}" fi + kernel_file_version "${_b}" done for _s in $INSTALLED_SETS; do + [ "$_v" -ge "57" -a "$_s" != "${_s%etc}" ] && continue local _file=${_s}${_v}.tgz if [ ${_s} == sendmail-smtp_auth ]; then _file=${_s}.gz @@ -288,7 +294,7 @@ fi signify -V -e -p $_keyfile -x $_type -m - | grep -f index | sha256 -c - else - grep -f index $_type | sum -c + grep -f index $_type | sha256 -c fi if [ $? -ne 0 ]; then @@ -323,6 +329,7 @@ fi for _s in $INSTALLED_SETS; do + [ "$_v" -ge "57" -a "$_s" != "${_s%etc}" ] && continue local _file=${_s}${_v}.tgz if [ ${_s} == sendmail-smtp_auth ]; then _file=${_s}.gz @@ -339,6 +346,7 @@ local _type for _type in $CHECKSUM_TYPES; do + [ -n "$NO_SIGNIFY" -a "$_type" != "${_type%.sig}" ] && continue if [ -e $_type ]; then check_sum $_type && break [ -z "$IGNORE_CHECKSUM_ERROR" ] && exit 1 @@ -509,6 +517,8 @@ FTP_CMD=${FTP_CMD:=ftp -V} PKG_PATH=${PKG_PATH:=/usr/ports/packages/`machine`/all/:${MIRROR}/`uname -r`/packages/`machine`/} +set_version + DESTDIR=${DESTDIR:=/} SYSMERGE=${SYSMERGE:=/usr/sbin/sysmerge} FORCE_DIR=${FORCE_DIR:=No} @@ -517,7 +527,6 @@ CHECKSUM_TYPES=${CHECKSUM_TYPES:=SHA256.sig SHA256} -set_version local _error=$? echo @@ -537,6 +546,13 @@ #echo " FILE_VER: $FILE_VER" echo +for k in $INSTALL_KERNELS; do + if [ -e "/$k" ]; then + echo "Existing $k" + kernel_file_version "/$k" + fi +done + if [ ${_error} -ne 0 ]; then exit ${_error} fi @@ -593,12 +609,15 @@ if [ -e /sbin/oreboot ]; then echo Removing /sbin/oreboot - $rm -f /sbin/oreboot + rm -f /sbin/oreboot fi update_etc echo '==> UPDATING PACKAGES' pkg_add -ui -F update -F updatedepends + + echo '==> UPDATING FIRMWARE' + fw_update else echo Instructions for updating to the new version available from