version 1.41, 2012/12/08 19:55:39 |
version 1.44, 2012/12/09 04:08:37 |
|
|
#!/bin/sh |
#!/bin/sh |
# $AFresh1: update_openbsd,v 1.40 2012/12/08 19:54:08 andrew Exp $ |
# $AFresh1: update_openbsd,v 1.43 2012/12/09 04:06:57 andrew Exp $ |
# |
# |
# Copyright (c) 2012 Andrew Fresh <andrew@afresh1.com> |
# Copyright (c) 2012 Andrew Fresh <andrew@afresh1.com> |
# |
# |
|
|
[ -e /boot.conf ] && sed -E '/^ *(set +image|boot) +/!d ; \ |
[ -e /boot.conf ] && sed -E '/^ *(set +image|boot) +/!d ; \ |
s///; s/^.*://; s/ .*$//' /boot.conf \ |
s///; s/^.*://; s/ .*$//' /boot.conf \ |
) | tail -1` |
) | tail -1` |
|
BOOT_KERNEL=`follow_symlink /$BOOT_KERNEL` |
BOOT_KERNEL="/${BOOT_KERNEL#/}" |
BOOT_KERNEL="/${BOOT_KERNEL#/}" |
BOOT_KERNEL=`follow_symlink $BOOT_KERNEL` |
|
|
|
BOOT_KERNEL_VERSION=`kernel_file_version $BOOT_KERNEL` |
BOOT_KERNEL_VERSION=`kernel_file_version $BOOT_KERNEL` |
|
|
|
|
read _temp |
read _temp |
fi |
fi |
|
|
if [ X"" != X"$SUDO" ]; then |
if [ -n "$SUDO" -a $CUR_VER != $NEW_VER ]; then |
echo Please enter your sudo password if prompted. |
echo >&2 |
echo You may be asked for it again later in the process. |
echo "!!! You are upgrading between OpenBSD versions. !!!" >&2 |
$SUDO -v |
echo "!!! You should make sure you have a 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 >&2 |
|
echo "ctrl+C to cancel, enter to continue" >&2 |
|
local _temp |
|
read _temp |
|
fi |
|
|
|
if [ -n "$SUDO" ]; then |
|
echo |
|
echo You may be asked for your sudo password multiple times. |
|
$SUDO -v -p "sudo Password: " |
fi |
fi |
|
|
install_kernels |
install_kernels |