1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-24 06:04:47 +00:00

The percentage heuristic has failed for me on 40% of the machines

I run, so it is clear it is going to fail for many more people when
the next release comes out.  It is wrong, back it out.
This commit is contained in:
deraadt
2026-03-21 01:34:25 +00:00
parent 0e8206e596
commit 8aa14d77a9

View File

@@ -1,6 +1,6 @@
#!/bin/ksh
#
# $OpenBSD: sysupgrade.sh,v 1.61 2026/01/17 21:20:44 kn Exp $
# $OpenBSD: sysupgrade.sh,v 1.62 2026/03/21 01:34:25 deraadt Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015 Robert Peichaer <rpe@openbsd.org>
@@ -118,8 +118,9 @@ $FORCE_VERSION && $SNAP &&
$FORCE && ! $SNAP &&
err "incompatible options: -f without -s"
if df -kP /usr | ! awk 'NR == 2 && $4 < 1*1024^2 { exit(1) }' && ! $FORCE; then
err "/usr appears too small. See sysupgrade(8) manpage about PRUNING."
USED_USR=$(df -P /usr | awk 'NR==2 {print substr($5, 1, length($5)-1)}')
if (( ${USED_USR} >= 90 )) && ! $FORCE; then
err "/usr appears too small. See sysupgrade(8) manpage about PRUNING."
fi
if $SNAP; then