[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.100 and 1.101

version 1.100, 2017/12/11 01:48:08 version 1.101, 2017/12/11 02:34:10
Line 1 
Line 1 
 #!/bin/sh  #!/bin/sh
 # $AFresh1: update_openbsd,v 1.99 2017/12/11 01:45:45 andrew Exp $  # $AFresh1: update_openbsd,v 1.100 2017/12/11 01:48:08 andrew Exp $
 #  #
 # Copyright (c) 2012 Andrew Fresh <andrew@afresh1.com>  # Copyright (c) 2012 Andrew Fresh <andrew@afresh1.com>
 #  #
Line 96 
Line 96 
   
 boot_device_mounted=""  boot_device_mounted=""
 mount_boot_device() {  mount_boot_device() {
     if [ "boot_device_mounted" ]; then      [ "boot_device_mounted" ] && return
         echo $boot_device_mounted  
         return  
     fi  
   
     local default_mount=$( df -lnP /bsd | sed -ne 's!/dev/.* !!p' )      local default_mount=$( df -lnP /bsd | sed -ne 's!/dev/.* !!p' )
     local boot_mount=$( mount |      local boot_mount=$( mount |
             sed -ne "s!^$BOOT_DEVICE on \([^ ]*\).*!\1!p" )              sed -ne "s!^$BOOT_DEVICE on \([^ ]*\).*!\1!p" )
   
     if [ ! "$boot_mount" ]; then      if [ ! "$boot_mount" ]; then
             mount $BOOT_DEVICE /mnt          mount $BOOT_DEVICE /mnt
             boot_device_mounted=/mnt          boot_device_mounted=""
             echo /mnt          KERNEL_ROOT=/mnt
     elif [ "$boot_mount" != "$default_mount" ]; then      elif [ "$boot_mount" != "$default_mount" ]; then
         echo $boot_mount/          KERNEL_ROOT=$boot_mount/
     else      else
         echo ${default_mount%/}/          KERNEL_ROOT=${default_mount%/}/
     fi      fi
 }  }
   
 umount_boot_device() {  umount_boot_device() {
     [ "$boot_device_mounted" ] && umount $boot_device_mounted      [ "$boot_device_mounted" ] && umount $BOOT_DEVICE
     boot_device_mounted=""      boot_device_mounted=""
 }  }
   
Line 217 
Line 214 
         FTP=${MIRROR}/${_dir}/`machine`          FTP=${MIRROR}/${_dir}/`machine`
     fi      fi
   
       KERNEL_ROOT=""
       [ -z "$BOOT_DEVICE" ] && set_boot_device
   
     BOOT_KERNEL=`( \      BOOT_KERNEL=`( \
         echo bsd; \          echo bsd; \
         [ -e /boot.conf ] && sed -E '/^ *(set +image|boot) +/!d ; \          [ -e /boot.conf ] && sed -E '/^ *(set +image|boot) +/!d ; \
Line 404 
Line 404 
   
     if [ ! "$_d" ]; then      if [ ! "$_d" ]; then
         default_mount=$( df -lnP /bsd | sed -ne 's!/dev/.* !!p' )          default_mount=$( df -lnP /bsd | sed -ne 's!/dev/.* !!p' )
         boot_mount=$( mount_boot_device )          mount_boot_device
   
         if [ "$boot_mount" != "$default_mount" ]; then          if [ "$KERNEL_ROOT" != "$default_mount" ]; then
                 local _ik="$INSTALL_KERNELS"                  local _ik="$INSTALL_KERNELS"
                 INSTALL_KERNELS="${BOOT_KERNEL#/} bsd.rd"                  INSTALL_KERNELS="${BOOT_KERNEL#/} bsd.rd"
   
                 install_kernels $boot_mount/                  install_kernels $KERNEL_ROOT
   
                 INSTALL_KERNELS="$_ik"                  INSTALL_KERNELS="$_ik"
         fi          fi
Line 593 
Line 593 
 export PKG_PATH TRUSTED_PKG_PATH  export PKG_PATH TRUSTED_PKG_PATH
   
 set_version  set_version
 [ -z "$BOOT_DEVICE" ] && set_boot_device  
   
 TRUSTED_PKG_PATH=${TRUSTED_PKG_PATH:=/usr/ports/packages/`machine -a`/all}  TRUSTED_PKG_PATH=${TRUSTED_PKG_PATH:=/usr/ports/packages/`machine -a`/all}
 if [ "$FORCE_DIR" = "No" ]; then  if [ "$FORCE_DIR" = "No" ]; then

Legend:
Removed from v.1.100  
changed lines
  Added in v.1.101

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