# HG changeset patch # User Franz Glasner # Date 1608191021 -3600 # Node ID cc4117f5f4bd026b9800f37dc253190898585ccc # Parent c85245833476daf2c6e3189a61c37a53d236a602 Implemented an "uversion" command: get the userspace FreeBSD-version of the host and all runnings jails diff -r c85245833476 -r cc4117f5f4bd sbin/fpkg --- a/sbin/fpkg Wed Dec 16 19:38:51 2020 +0100 +++ b/sbin/fpkg Thu Dec 17 08:43:41 2020 +0100 @@ -54,6 +54,11 @@ Retrieve the value of a given configuration opeion on the local host and all running visible jails + uversion + + Call `freebsd-version -u` on the local host and all running visible + jails + vv `pkg -vv` on the local host and all running visible jails @@ -133,6 +138,17 @@ } +command_uversion() { + : ' Do a local `freebsd-version -u` and also for all running jails + + ' + echo "LOCALHOST: $(/bin/freebsd-version -u)" + for _jail in $(jls -N | awk '{if(NR>1)print $1}' | sort); do + echo "${_jail}: $(jexec -l "${_jail}" /bin/freebsd-version -u)" + done +} + + command_audit() { : 'Do a local `pkg audit -Fr` and also for all running jails @@ -348,6 +364,9 @@ config) command_config "$@" ;; + uversion) + command_uversion "$@" + ;; vv) command_vv "$@" ;;