freebsd-update versions?

@lbutlr kremels at kreme.com
Mon Jun 1 18:42:32 UTC 2020


On 01 Jun 2020, at 08:38, Matthew Seaman <matthew at FreeBSD.org> wrote:
> On 31/05/2020 21:59, @lbutlr wrote:
>> Since there is not a way to see the available versions via the
>> freebsd-update tool, what is the recommended way to get access to a list
>> of what is available for use with freebsd-update -r?
> 
> By checking on this web page under 'Production Release':

> https://www.freebsd.org/releases/

That is not that helpful when you are on the console, or even when you are in a ssh session since you have to then switch to some other program to check. Is there really no way to list the current versions other than accessing a web page?


On 01 Jun 2020, at 09:03, Polytropon <freebsd at edvax.de> wrote:
> This (and the "Errata" subpages) are quite informative, but
> I assume the information expected is something like this:
> 
> 	# freebsd-update -e		<- what we could get
> 	12.1-RELEASE-p7
> 	12.2-RELEASE
> 
> 	# freebsd-update -r <choice> upgrade

Yes, something very much like this without having to go 'off-server' for a web browser or do some scraping along the lines of

 wget -q -O- https://www.freebsd.org/releases/ \
	| grep "Production Release:" \
	| awk -F'>' '{print $4}' \
	| sed 's/.\{3\}$//'
12.1
11.3

Or

wget -q -O- https://www.freebsd.org/releases/ \
	| grep "<p><b>Release " \ # or grep "Release [0-9]"  if you prefer
	| awk '{print $2}' \
	| sed 's/.\{4\}$//'


Which is bound to fail at some point. (Sooner more likely than later.)



-- 
I SAW NOTHING UNUSUAL IN THE TEACHER'S LOUNGE Bart chalkboard Ep.
	8F17




More information about the freebsd-questions mailing list