[BACK]Return to update_openbsd CVS log [TXT][DIR] Up to [local] / openbsd / update_openbsd

Diff for /openbsd/update_openbsd/update_openbsd between version 1.115 and 1.120

version 1.115, 2018/12/16 20:55:03 version 1.120, 2019/03/02 00:34:34
Line 1 
Line 1 
 #!/bin/sh  #!/bin/sh
 # $AFresh1: update_openbsd,v 1.114 2018/12/16 20:49:58 andrew Exp $  # $AFresh1: update_openbsd,v 1.119 2018/12/16 23:42:07 andrew Exp $
 #  #
 # Copyright (c) 2012 Andrew Fresh <andrew@afresh1.com>  # Copyright (c) 2012 Andrew Fresh <andrew@afresh1.com>
 #  #
Line 172 
Line 172 
     if [ X"" != X"${MIRROR}" -a X"" == X"${_v}" ]; then      if [ X"" != X"${MIRROR}" -a X"" == X"${_v}" ]; then
         if [ X"No" != X"${FORCE_DIR}" ]; then          if [ X"No" != X"${FORCE_DIR}" ]; then
             _dir=${FORCE_DIR}              _dir=${FORCE_DIR}
         elif sysctl kern.version | grep -q -- '-current '; then          elif sysctl kern.version | grep -q -e '-current ' -e '-beta '; then
             _dir=snapshots              _dir=snapshots
             FORCE_DIR=snapshots              FORCE_DIR=snapshots
         else          else
Line 251 
Line 251 
     fi      fi
   
     cd $KERNEL_ROOT      cd $KERNEL_ROOT
     BOOT_KERNEL=$( find_boot_kernel )      BOOTED_KERNEL=$( find_boot_kernel )
     BOOT_KERNEL_VERSION=$( kernel_file_version $BOOT_KERNEL )      BOOT_KERNEL_VERSION=$( kernel_file_version $BOOTED_KERNEL )
     if [ $(sysctl -n hw.ncpufound) -gt 1 ] || kernel_is_multiprocessor $BOOT_KERNEL; then  
       if [ $(sysctl -n hw.ncpufound) -gt 1 ] || kernel_is_multiprocessor $BOOTED_KERNEL; then
         BOOT_KERNEL=bsd.mp          BOOT_KERNEL=bsd.mp
       else
           BOOT_KERNEL=$BOOTED_KERNEL
     fi      fi
   
     BOOTED_KERNEL_VERSION=`sysctl -n kern.version`      BOOTED_KERNEL_VERSION=`sysctl -n kern.version`
Line 486 
Line 489 
     [ $_d != / ] && mount | grep -q " on ${_d%/} .* msdos" && mount_is_msdos=1      [ $_d != / ] && mount | grep -q " on ${_d%/} .* msdos" && mount_is_msdos=1
   
     if [ "$EFI_BOOT" -a -d /mnt/efi/boot ]; then      if [ "$EFI_BOOT" -a -d /mnt/efi/boot ]; then
        echo "Copying $EFI_BOOT to /mnt/efi/boot/$EFI_BOOT"         echo "Copying $EFI_BOOT to /mnt/efi/boot/"
        ( cd /mnt/efi/boot \         ( cd /mnt/efi/boot \
          && cp "$RELEASEDIR/$EFI_BOOT" "n$EFI_BOOT"           && cp "$RELEASEDIR/$EFI_BOOT" "n$EFI_BOOT" \
          && mv "n$EFI_BOOT" "$EFI_BOOT"           && mv "n$EFI_BOOT" "$EFI_BOOT"
        )         )
     fi      fi
   
     if [ X"$BOOT_KERNEL_VERSION" != X"$NEW_KERNEL_VERSION" ]; then      if [ X"$BOOT_KERNEL_VERSION" != X"$NEW_KERNEL_VERSION" ]; then
         echo "===> Backing up ${_d}$BOOT_KERNEL to ${_d}obsd"          echo "===> Backing up ${_d}$BOOTED_KERNEL to ${_d}obsd"
         if [ $mount_is_msdos ]; then          if [ $mount_is_msdos ]; then
             cp ${_d}$BOOT_KERNEL ${_d}obsd              cp ${_d}$BOOTED_KERNEL ${_d}obsd
         else          else
             ln -f ${_d}$BOOT_KERNEL ${_d}obsd              ln -f ${_d}$BOOTED_KERNEL ${_d}obsd
         fi          fi
         if [ $? -ne 0 ]; then          if [ $? -ne 0 ]; then
             echo "Error copying old kernel!" >&2              echo "Error copying old kernel!" >&2
Line 543 
Line 546 
         done          done
         cd $OLDPWD          cd $OLDPWD
     fi      fi
   
       echo "===> Updating /var/db/kernel.SHA256"
       sha256 -h /var/db/kernel.SHA256 ${_d}/bsd
 }  }
   
 install_sets() {  install_sets() {
Line 715 
Line 721 
 echo "===> Last booted:\n$BOOTED_KERNEL_VERSION"  echo "===> Last booted:\n$BOOTED_KERNEL_VERSION"
 if [ X"$BOOT_KERNEL_VERSION" != X"$BOOTED_KERNEL_VERSION" \  if [ X"$BOOT_KERNEL_VERSION" != X"$BOOTED_KERNEL_VERSION" \
   -a X"$BOOT_KERNEL_VERSION" != X"$NEW_KERNEL_VERSION" ]; then    -a X"$BOOT_KERNEL_VERSION" != X"$NEW_KERNEL_VERSION" ]; then
     echo "Next boot (unless replaced):\n$BOOT_KERNEL_VERSION"      echo "Next boot $BOOTED_KERNEL (unless replaced):\n$BOOT_KERNEL_VERSION"
 fi  fi
 if [ -n "$NEW_KERNEL_VERSION" ]; then  if [ -n "$NEW_KERNEL_VERSION" ]; then
     echo "===> New $BOOT_KERNEL:\n$NEW_KERNEL_VERSION";      echo "===> New $BOOT_KERNEL:\n$NEW_KERNEL_VERSION";
Line 748 
Line 754 
         fi          fi
         echo "/sbin/reboot copied to /sbin/oreboot"          echo "/sbin/reboot copied to /sbin/oreboot"
     fi      fi
   fi
   
   if [ $( ls -1 /usr/share/relink/ 2>/dev/null | wc -l ) -gt 0 ]; then
       echo "==> REMOVING /usr/share/relink/*"
       rm -rf /usr/share/relink/*
 fi  fi
   
 install_kernels  install_kernels

Legend:
Removed from v.1.115  
changed lines
  Added in v.1.120

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>