# HG changeset patch # User Franz Glasner # Date 1727786980 -7200 # Node ID bda643a6310e157f8a6b4cc5f6463d2a1e194962 # Parent 918932936c68f7058eea830df5248d5c5144c5f5 fpkg: Implement the "etcupdate-status" command diff -r 918932936c68 -r bda643a6310e docs/man/man8/fpkg.rst --- a/docs/man/man8/fpkg.rst Tue Oct 01 14:25:34 2024 +0200 +++ b/docs/man/man8/fpkg.rst Tue Oct 01 14:49:40 2024 +0200 @@ -58,6 +58,11 @@ option on the local host and all running visible and compatible jails (:command:`pkg config`). +:manpage:`fpkg-etcupdate-status(8)` + + Call :command:`etcupdate status` on the local host and all running + visible jails. + :manpage:`fpkg-update(8)` Call :command:`pkg update` on the local host and all running diff -r 918932936c68 -r bda643a6310e sbin/fpkg --- a/sbin/fpkg Tue Oct 01 14:25:34 2024 +0200 +++ b/sbin/fpkg Tue Oct 01 14:49:40 2024 +0200 @@ -34,6 +34,11 @@ `pkg audit` on the local host and all running visible and compatible jails + etcupdate-status + + Call `etcupdate status` on the local host and in all running visible + jails + update `pkg update` on the local host and all running visible and @@ -320,6 +325,24 @@ } +command_etcupdate_status() { + : 'Call `etcupdate status` on the host and all running jails + + ' + local _j _OLDIFS + + printf '%sLOCALHOST\n' "${FPKG_SIGN}" + /usr/sbin/etcupdate status + _OLDIFS="${IFS}" + IFS=$'\n' + for _j in $(/usr/sbin/jls name | /usr/bin/sort); do + printf '\n%sJAIL: %s\n' "${FPKG_SIGN}" "${_j}" + LC_ALL=C.UTF-8 /usr/sbin/jexec -- "${_j}" /usr/sbin/etcupdate status + done + IFS="${_OLDIFS}" +} + + # # Global option handling # @@ -359,6 +382,9 @@ audit) command_audit "$@" ;; + etcupdate-status|etcupdate_status|status-etcupdate|status_etcupdate) + command_etcupdate_status "$@" + ;; update) command_update "$@" ;;