Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
changeset 169:cc4117f5f4bd
Implemented an "uversion" command: get the userspace FreeBSD-version of the host and all runnings jails
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 17 Dec 2020 08:43:41 +0100 |
| parents | c85245833476 |
| children | b729fa681eb5 |
| files | sbin/fpkg |
| diffstat | 1 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 "$@" ;;
