Hello,
Here is a diff to allow selection of packages to install.
My routers do not need X or games to be installed.
$ doas sysupgrade -s -CGMX
SHA256.sig 100%
|***************************************************************************|
2141 00:00
Signature Verified
INSTALL.amd64 100%
|**************************************************************************|
43535 00:00
base65.tgz 100%
|***************************************************************************|
202 MB 00:05
bsd 100%
|***************************************************************************|
15662 KB 00:00
bsd.mp 100%
|***************************************************************************|
15753 KB 00:00
bsd.rd 100%
|***************************************************************************|
10016 KB 00:00
Verifying sets.
There is probably a better way to do this though.
Index: sysupgrade.8
===================================================================
RCS file: /cvs/src/usr.sbin/sysupgrade/sysupgrade.8,v
retrieving revision 1.8
diff -u -p -r1.8 sysupgrade.8
--- sysupgrade.8 9 May 2019 21:09:37 -0000 1.8
+++ sysupgrade.8 9 Jul 2019 14:49:14 -0000
@@ -24,6 +24,7 @@
.Nm
.Op Fl fkn
.Op Fl r | s
+.Op Fl CGMX
.Op Ar installurl
.Sh DESCRIPTION
.Nm
@@ -72,6 +73,14 @@ The default is to find out if the system
In case of release
.Nm
downloads the next release.
+.It Fl C
+Do not install comp*.tgz set.
+.It Fl G
+Do not install game*.tgz set.
+.It Fl M
+Do not install man*.tgz set.
+.It Fl X
+Do not install x*.tgz sets.
.El
.Sh FILES
.Bl -tag -width "/home/_sysupgrade" -compact
Index: sysupgrade.sh
===================================================================
RCS file: /cvs/src/usr.sbin/sysupgrade/sysupgrade.sh,v
retrieving revision 1.22
diff -u -p -r1.22 sysupgrade.sh
--- sysupgrade.sh 21 Jun 2019 16:50:26 -0000 1.22
+++ sysupgrade.sh 9 Jul 2019 14:49:14 -0000
@@ -33,7 +33,7 @@ ug_err()
usage()
{
- ug_err "usage: ${0##*/} [-fkn] [-r | -s] [installurl]"
+ ug_err "usage: ${0##*/} [-fkn] [-r | -s] [-CGMX] [installurl]"
}
unpriv()
@@ -75,13 +75,22 @@ FORCE=false
KEEP=false
REBOOT=true
-while getopts fknrs arg; do
+NOCOMP=
+NOGAME=
+NOMAN=
+NOX=
+
+while getopts fknrsCGMX arg; do
case ${arg} in
f) FORCE=true;;
k) KEEP=true;;
n) REBOOT=false;;
r) RELEASE=true;;
s) SNAP=true;;
+ C) NOCOMP='-e /^comp/d';;
+ G) NOGAME='-e /^game/d';;
+ M) NOMAN='-e /^man/d';;
+ X) NOX='-e /^x/d';;
*) usage;;
esac
done
@@ -154,8 +163,9 @@ if cmp -s /var/db/installed.SHA256 SHA25
exit 0
fi
-# INSTALL.*, bsd*, *.tgz
+# INSTALL.*, bsd*, and selected *.tgz
SETS=$(sed -n -e 's/^SHA256 (\(.*\)) .*/\1/' \
+ $NOCOMP $NOGAME $NOMAN $NOX \
-e '/^INSTALL\./p;/^bsd/p;/\.tgz$/p' SHA256)
OLD_FILES=$(ls)