mirror of
https://github.com/openbsd/src.git
synced 2024-12-21 23:18:00 -08:00
Add support for performing a sysupgrade from a path. This is convenient
for offline machines if you can pull the snapshot or release to there there, but want sysupgrade to locally perform signify validation before performing the /home/_sysupgrade and other boot-upgrade steps. ok florian
This commit is contained in:
parent
e683af9072
commit
36ac5f1008
@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: sysupgrade.8,v 1.21 2024/10/11 14:12:05 deraadt Exp $
|
||||
.\" $OpenBSD: sysupgrade.8,v 1.22 2024/10/25 03:42:06 deraadt Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2019 Florian Obser <florian@openbsd.org>
|
||||
.\"
|
||||
@ -14,7 +14,7 @@
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.Dd $Mdocdate: October 11 2024 $
|
||||
.Dd $Mdocdate: October 25 2024 $
|
||||
.Dt SYSUPGRADE 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -25,7 +25,7 @@
|
||||
.Op Fl fkns
|
||||
.Op Fl b Ar base-directory
|
||||
.Op Fl R Ar version
|
||||
.Op Ar installurl
|
||||
.Op Ar installurl | path
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
is a utility to upgrade
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/ksh
|
||||
#
|
||||
# $OpenBSD: sysupgrade.sh,v 1.56 2024/10/11 14:12:05 deraadt Exp $
|
||||
# $OpenBSD: sysupgrade.sh,v 1.57 2024/10/25 03:42:06 deraadt Exp $
|
||||
#
|
||||
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
|
||||
# Copyright (c) 2015 Robert Peichaer <rpe@openbsd.org>
|
||||
@ -35,7 +35,7 @@ err()
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "usage: ${0##*/} [-fkns] [-b base-directory] [-R version] [installurl]" 1>&2
|
||||
echo "usage: ${0##*/} [-fkns] [-b base-directory] [-R version] [installurl | path]" 1>&2
|
||||
return 1
|
||||
}
|
||||
|
||||
@ -73,6 +73,7 @@ rmel() {
|
||||
}
|
||||
|
||||
SNAP=false
|
||||
FILE=false
|
||||
FORCE=false
|
||||
FORCE_VERSION=false
|
||||
KEEP=false
|
||||
@ -111,7 +112,7 @@ case $# in
|
||||
*) usage
|
||||
esac
|
||||
[[ $MIRROR == @(file|ftp|http|https)://* ]] ||
|
||||
err "invalid installurl: $MIRROR"
|
||||
FILE=true
|
||||
$FORCE_VERSION && $SNAP &&
|
||||
err "incompatible options: -s -R $NEXT_VERSION"
|
||||
$FORCE && ! $SNAP &&
|
||||
@ -125,6 +126,12 @@ else
|
||||
$FORCE_VERSION || ALT_URL=${MIRROR}/${VERSION}/${ARCH}/
|
||||
fi
|
||||
|
||||
# Oh wait, this is a path install
|
||||
if $FILE; then
|
||||
URL=file://$MIRROR/
|
||||
ALT_URL=
|
||||
fi
|
||||
|
||||
install -d -o 0 -g 0 -m 0755 ${SETSDIR}
|
||||
cd ${SETSDIR}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user