=================================================================== RCS file: /cvs/openbsd/update_openbsd/update_openbsd,v retrieving revision 1.97 retrieving revision 1.98 diff -u -r1.97 -r1.98 --- openbsd/update_openbsd/update_openbsd 2017/12/11 00:52:41 1.97 +++ openbsd/update_openbsd/update_openbsd 2017/12/11 01:35:44 1.98 @@ -1,5 +1,5 @@ #!/bin/sh -# $AFresh1: update_openbsd,v 1.96 2017/12/10 21:20:53 andrew Exp $ +# $AFresh1: update_openbsd,v 1.97 2017/12/11 00:52:41 andrew Exp $ # # Copyright (c) 2012 Andrew Fresh # @@ -79,10 +79,10 @@ echo $_v } -set_boot_partition() { - BOOT_PARTITION=$( df -nP /bsd | sed -ne 's! .*/$!!p' ) +set_boot_device() { + BOOT_DEVICE=$( df -nP /bsd | sed -ne 's! .*/$!!p' ) - root_disk=$( echo $BOOT_PARTITION | + root_disk=$( echo $BOOT_DEVICE | sed -e 's,/dev/\([a-z]*[0-9]\)[a-z].*,\1,' ) msdos_partition=$( fdisk $root_disk | grep -q '^*.*FAT32' \ @@ -91,7 +91,7 @@ ) [ "$msdos_partition" ] && - BOOT_PARTITION="/dev/$root_disk$msdos_partition" + BOOT_DEVICE="/dev/$root_disk$msdos_partition" } set_version() { @@ -377,15 +377,15 @@ if [ ! "$_d" ]; then boot_mount=$( mount | - sed -ne "s!^$BOOT_PARTITION on \([^ ]*\).*!\1!p" ) + sed -ne "s!^$BOOT_DEVICE on \([^ ]*\).*!\1!p" ) local _ik="$INSTALL_KERNELS" INSTALL_KERNELS="${BOOT_KERNEL#/} bsd.rd" if [ ! "$boot_mount" ]; then - mount $BOOT_PARTITION /mnt + mount $BOOT_DEVICE /mnt install_kernels /mnt/ - umount $BOOT_PARTITION + umount $BOOT_DEVICE elif [ "$boot_mount" != "$default_mount" ]; then install_kernels $boot_mount/ fi @@ -567,7 +567,7 @@ export PKG_PATH TRUSTED_PKG_PATH set_version -[ -z "$BOOT_PARTITION" ] && set_boot_partition +[ -z "$BOOT_DEVICE" ] && set_boot_device TRUSTED_PKG_PATH=${TRUSTED_PKG_PATH:=/usr/ports/packages/`machine -a`/all} if [ "$FORCE_DIR" = "No" ]; then @@ -592,7 +592,7 @@ echo "TRUSTED_PKG_PATH: $TRUSTED_PKG_PATH" echo " RELEASEDIR: $RELEASEDIR" echo " DESTDIR: $DESTDIR" -echo " BOOT_PARTITION: $BOOT_PARTITION" +echo " BOOT_DEVICE: $BOOT_DEVICE" echo " BOOT_KERNEL: $BOOT_KERNEL" echo " INSTALL_KERNELS: $INSTALL_KERNELS" echo " INSTALLED_SETS: $INSTALLED_SETS"