=================================================================== RCS file: /cvs/openbsd/update_openbsd/update_openbsd,v retrieving revision 1.71 retrieving revision 1.78 diff -u -r1.71 -r1.78 --- openbsd/update_openbsd/update_openbsd 2015/01/18 03:01:08 1.71 +++ openbsd/update_openbsd/update_openbsd 2015/10/12 00:35:14 1.78 @@ -1,5 +1,5 @@ #!/bin/sh -# $AFresh1: update_openbsd,v 1.70 2015/01/18 02:59:23 andrew Exp $ +# $AFresh1: update_openbsd,v 1.77 2015/05/03 00:11:52 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 @@ -255,9 +257,7 @@ local _file=$1 # This could go circular, but I dunno how to fix that. if [ -h $_file ]; then - follow_symlink $( file $_file | - grep 'symbolic link' | - sed -e s/^.*\\\`// -e s/\\\'\$// ) + follow_symlink $( readlink -f $_file ) else echo $_file fi @@ -292,7 +292,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 @@ -344,6 +344,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 @@ -514,6 +515,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} @@ -522,7 +525,6 @@ CHECKSUM_TYPES=${CHECKSUM_TYPES:=SHA256.sig SHA256} -set_version local _error=$? echo @@ -581,7 +583,7 @@ echo "!!! at the end of the proces but it is safer to !!!" >&2 echo "!!! have a separate root shell open. !!!" >&2 echo "!!! It is needed in order to run /sbin/oreboot. !!!" >&2 - echo "!!! sudo MAY NOT WORK after sets are extracted. !!!" >&2 + echo "!!! doas MAY NOT WORK after sets are extracted. !!!" >&2 echo >&2 echo "enter to continue, ctrl+C to cancel" >&2 local _temp @@ -609,8 +611,17 @@ fi update_etc - echo '==> UPDATING PACKAGES' - pkg_add -ui -F update -F updatedepends + OPENUP=$( which openup ) + if [ -n "$OPENUP" ]; then + echo "==> UPDATING WITH $OPENUP" + $OPENUP + else + echo '==> UPDATING PACKAGES' + pkg_add -ui -F update -F updatedepends + fi + + echo '==> UPDATING FIRMWARE' + fw_update else echo Instructions for updating to the new version available from