Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
comparison sbin/fpkg @ 686:bda643a6310e
fpkg: Implement the "etcupdate-status" command
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Tue, 01 Oct 2024 14:49:40 +0200 |
| parents | 918932936c68 |
| children | 3e96fc952c45 |
comparison
equal
deleted
inserted
replaced
| 685:918932936c68 | 686:bda643a6310e |
|---|---|
| 32 audit | 32 audit |
| 33 | 33 |
| 34 `pkg audit` on the local host and all running visible and | 34 `pkg audit` on the local host and all running visible and |
| 35 compatible jails | 35 compatible jails |
| 36 | 36 |
| 37 etcupdate-status | |
| 38 | |
| 39 Call `etcupdate status` on the local host and in all running visible | |
| 40 jails | |
| 41 | |
| 37 update | 42 update |
| 38 | 43 |
| 39 `pkg update` on the local host and all running visible and | 44 `pkg update` on the local host and all running visible and |
| 40 compatible jails | 45 compatible jails |
| 41 | 46 |
| 315 pkg -j "${_j}" -vv | 320 pkg -j "${_j}" -vv |
| 316 else | 321 else |
| 317 echo "${FPKG_SKIPSIGN}SKIPPED because of different userland" | 322 echo "${FPKG_SKIPSIGN}SKIPPED because of different userland" |
| 318 fi | 323 fi |
| 319 done | 324 done |
| 325 } | |
| 326 | |
| 327 | |
| 328 command_etcupdate_status() { | |
| 329 : 'Call `etcupdate status` on the host and all running jails | |
| 330 | |
| 331 ' | |
| 332 local _j _OLDIFS | |
| 333 | |
| 334 printf '%sLOCALHOST\n' "${FPKG_SIGN}" | |
| 335 /usr/sbin/etcupdate status | |
| 336 _OLDIFS="${IFS}" | |
| 337 IFS=$'\n' | |
| 338 for _j in $(/usr/sbin/jls name | /usr/bin/sort); do | |
| 339 printf '\n%sJAIL: %s\n' "${FPKG_SIGN}" "${_j}" | |
| 340 LC_ALL=C.UTF-8 /usr/sbin/jexec -- "${_j}" /usr/sbin/etcupdate status | |
| 341 done | |
| 342 IFS="${_OLDIFS}" | |
| 320 } | 343 } |
| 321 | 344 |
| 322 | 345 |
| 323 # | 346 # |
| 324 # Global option handling | 347 # Global option handling |
| 357 | 380 |
| 358 case "${command}" in | 381 case "${command}" in |
| 359 audit) | 382 audit) |
| 360 command_audit "$@" | 383 command_audit "$@" |
| 361 ;; | 384 ;; |
| 385 etcupdate-status|etcupdate_status|status-etcupdate|status_etcupdate) | |
| 386 command_etcupdate_status "$@" | |
| 387 ;; | |
| 362 update) | 388 update) |
| 363 command_update "$@" | 389 command_update "$@" |
| 364 ;; | 390 ;; |
| 365 upgrade) | 391 upgrade) |
| 366 command_upgrade "$@" | 392 command_upgrade "$@" |
