~fgaz/builds.sr.ht

178dc2a48c93f7af30a4f3dc9b759f3ef08caeea — Jason Lenz 1 year, 7 months ago bad3b0c
openbsd: during genimg, continue if syspatch exit status is 0 or 2
1 files changed, 8 insertions(+), 0 deletions(-)

M images/openbsd/genimg
M images/openbsd/genimg => images/openbsd/genimg +8 -0
@@ 133,7 133,15 @@ if [ "${openbsd_bootstrap}" = "NO" ]; then

  if [ "$run_syspatch" = "YES" ]
  then
    set +e
    chroot /mnt ksh -x /usr/sbin/syspatch
    syspatch_status=$?
    set -e
    # Per man syspatch(8)
    # The syspatch utility exits 0 on success, and >0 if an error occurs.  In
    # particular, 2 indicates that applying patches was requested but no
    # additional patch was installed.
    test $syspatch_status -eq 0 -o $syspatch_status -eq 2
  fi

  chroot /mnt /usr/sbin/pkg_add $pkg_add_params -u