Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141752480
D1550.id3224.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D1550.id3224.diff
View Options
Index: usr.sbin/freebsd-update/freebsd-update.8
===================================================================
--- usr.sbin/freebsd-update/freebsd-update.8
+++ usr.sbin/freebsd-update/freebsd-update.8
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 14, 2010
+.Dd January 17, 2015
.Dt FREEBSD-UPDATE 8
.Os FreeBSD
.Sh NAME
@@ -33,6 +33,7 @@
.Nd fetch and install binary updates to FreeBSD
.Sh SYNOPSIS
.Nm
+.Op Fl F
.Op Fl b Ar basedir
.Op Fl d Ar workdir
.Op Fl f Ar conffile
@@ -54,16 +55,16 @@
.Fx
Release Engineering Team, e.g.,
.Fx
-7.3-RELEASE and
+9.3-RELEASE and
.Fx
-8.0-RELEASE, but not
+10.1-RELEASE, but not
.Fx
-6.3-STABLE or
+9.3-STABLE or
.Fx
-9.0-CURRENT.
+11-CURRENT.
.Sh OPTIONS
The following options are supported:
-.Bl -tag -width "-f conffile"
+.Bl -tag -width "-f newrelease"
.It Fl b Ar basedir
Operate on a system mounted at
.Ar basedir .
@@ -81,6 +82,11 @@
.Ar conffile .
(default:
.Pa /etc/freebsd-update.conf )
+.It Fl F
+Force
+.Nm
+.Cm fetch
+to proceed where it normally would not, such as when there is no tty.
.It Fl k Ar KEY
Trust an RSA key with SHA256 of
.Ar KEY .
Index: usr.sbin/freebsd-update/freebsd-update.sh
===================================================================
--- usr.sbin/freebsd-update/freebsd-update.sh
+++ usr.sbin/freebsd-update/freebsd-update.sh
@@ -43,6 +43,7 @@
(default: /var/db/freebsd-update/)
-f conffile -- Read configuration options from conffile
(default: /etc/freebsd-update.conf)
+ -F -- Force a fetch operation to proceed
-k KEY -- Trust an RSA key with SHA256 hash of KEY
-r release -- Target for upgrade (e.g., 6.2-RELEASE)
-s server -- Server from which to fetch updates
@@ -399,6 +400,9 @@
# No commands specified yet
COMMANDS=""
+
+ # Force fetch to proceed
+ FORCEFETCH=0
}
# Parse the command line
@@ -411,6 +415,9 @@
if [ ! -z "${CONFFILE}" ]; then usage; fi
shift; CONFFILE="$1"
;;
+ -F)
+ FORCEFETCH=1
+ ;;
# Configuration file equivalents
-b)
@@ -673,6 +680,14 @@
echo "(Did you mean 'upgrade' instead?)"
exit 1
fi
+
+ # Check that we have updates ready to install
+ if [ -f ${BDHASH}-install/kerneldone && $FORCEFETCH -eq 0 ]; then
+ echo "You have a partially completed upgrade pending"
+ echo "Run '$0 install' first."
+ echo "Run '$0 fetch -F' to proceed anyway."
+ exit 1
+ fi
}
# Perform sanity checks etc. before fetching upgrades.
@@ -3188,7 +3203,7 @@
# Fetch command. Make sure that we're being called
# interactively, then run fetch_check_params and fetch_run
cmd_fetch () {
- if [ ! -t 0 ]; then
+ if [ ! -t 0 && $FORCEFETCH -eq 0 ]; then
echo -n "`basename $0` fetch should not "
echo "be run non-interactively."
echo "Run `basename $0` cron instead."
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 10, 10:04 PM (11 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27602885
Default Alt Text
D1550.id3224.diff (2 KB)
Attached To
Mode
D1550: Add a sanity check to freebsd-update to disallow a 'fetch' if there are uninstalled upgraded pending Add a -F parameter to override the new behaviour. This also allows fetch to be run without a tty.
Attached
Detach File
Event Timeline
Log In to Comment