-.\" $OpenBSD: sysupgrade.8,v 1.12 2021/11/08 16:12:10 kn Exp $
+.\" $OpenBSD: sysupgrade.8,v 1.13 2022/06/08 09:03:11 mglocker Exp $
.\"
.\" Copyright (c) 2019 Florian Obser <florian@openbsd.org>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: November 8 2021 $
+.Dd $Mdocdate: June 8 2022 $
.Dt SYSUPGRADE 8
.Os
.Sh NAME
.Nm
.Op Fl fkn
.Op Fl r | s
+.Op Fl b Ar base-directory
.Op Ar installurl
.Sh DESCRIPTION
.Nm
.Pp
The options are as follows:
.Bl -tag -width Ds
+.It Fl b Ar base-directory
+Download files to
+.Ar base-directory Ns / Ns Pa _sysupgrade
+instead of
+.Pa /home/_sysupgrade .
.It Fl f
Force an already applied upgrade.
The default is to upgrade to latest snapshot only if available.
#!/bin/ksh
#
-# $OpenBSD: sysupgrade.sh,v 1.47 2022/06/02 07:44:18 florian Exp $
+# $OpenBSD: sysupgrade.sh,v 1.48 2022/06/08 09:03:11 mglocker Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015 Robert Peichaer <rpe@openbsd.org>
usage()
{
- echo "usage: ${0##*/} [-fkn] [-r | -s] [installurl]" 1>&2
+ echo "usage: ${0##*/} [-fkn] [-r | -s] [-b base-directory] [installurl]" 1>&2
return 1
}
KEEP=false
REBOOT=true
-while getopts fknrs arg; do
+while getopts b:fknrs arg; do
case ${arg} in
+ b) SETSDIR=${OPTARG}/_sysupgrade;;
f) FORCE=true;;
k) KEEP=true;;
n) REBOOT=false;;