unattended freebsd jail update

Hey , happy new year to everyone,

what am I doing wrong here ?
I am asking, because I do have a script that updates my basejail for years with the same logic , but it never complained that this does not work. Maybe the automation is hiding this , but I don't have logs so I don't really know if this worked in the past and just always passed without know this updates was not applied.

Should't this work or do I still have to patch my env with something like this .

PAGER="cat"

Docs
--not-running-from-cron
Force freebsd-update fetch to proceed when there is no
controlling tty(4). This is for use by automated scripts
and orchestration tools. Please do not run freebsd-update
fetch from crontab(5) or similar using this flag, see:
freebsd-update cron

freebsd-update -d /var/db/jails/freebsd-update/ -b /data/jails/capybara --currently-running 14.3-RELEASE -r 15.0-RELEASE upgrade

The following components of FreeBSD seem to be installed:
kernel/generic world/base world/lib32

The following components of FreeBSD do not seem to be installed:
kernel/generic-dbg world/base-dbg world/lib32-dbg

Does this look reasonable (y/n)?
root@melmac:~ # freebsd-update --not-running-from-cron -d /var/db/jails/freebsd-update/ -b /data/jails/capybara --currently-running 14.3-RELEASE -r 15.0-RELEASE upgrade
pkg: Warning: Major OS version upgrade detected. Running "pkg bootstrap -f" recommended
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 14.3-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic world/base world/lib32

The following components of FreeBSD do not seem to be installed:
kernel/generic-dbg world/base-dbg world/lib32-dbg

Does this look reasonable (y/n)? ^C
 
Ok , I have missed this part of the docs . That might be a hint it never worked like I thought.

ENVIRONMENT
PAGER The pager program used to present various reports during the
execution. (Default: “/usr/bin/less”.)

PAGER can be set to “cat” when a non-interactive pager is desired.
 
Major version upgrades might need manual merges. It's going to stall on that.

I would suggest not doing version upgrades (only updates) on your base jail. Just create a new base jail with the new version.
 
Back
Top