root / plugins / other / freebsd-upgrades @ 83159620
Historique | Voir | Annoter | Télécharger (940 octets)
| 1 | d1b9cbbb | Manuel Schneider | #!/usr/local/bin/bash |
|---|---|---|---|
| 2 | |||
| 3 | if [ "$1" = "config" ]; then |
||
| 4 | echo "graph_title Available Updates" |
||
| 5 | echo "graph_args --base 1000 -l 0" |
||
| 6 | echo "graph_vlabel upgradeable packages/ports " |
||
| 7 | echo "pkg.label binary packages" |
||
| 8 | echo "ports.label ports" |
||
| 9 | exit 0 |
||
| 10 | fi |
||
| 11 | |||
| 12 | if [ "$1" = "autoconf" ]; then |
||
| 13 | echo "yes" |
||
| 14 | exit 0 |
||
| 15 | fi |
||
| 16 | |||
| 17 | updates="$(freebsd-update fetch | \ |
||
| 18 | grep -v 'Looking up update.FreeBSD.org mirrors' | \ |
||
| 19 | grep -v 'Fetching metadata signature' | \ |
||
| 20 | grep -v 'Fetching metadata index' | \ |
||
| 21 | grep -v 'Inspecting system' | \ |
||
| 22 | grep -v 'Preparing to download files' | \ |
||
| 23 | grep -v -e '^$' | \ |
||
| 24 | grep -v 'The following files will be added' | \ |
||
| 25 | grep -v 'No updates needed' | \ |
||
| 26 | grep -v 'The following files will be updated' | wc -l | sed -e 's/ //g' )" |
||
| 27 | |||
| 28 | updates="$(echo -n "${updates}")"
|
||
| 29 | |||
| 30 | echo "pkg.value $updates" |
||
| 31 | |||
| 32 | |||
| 33 | updates="$(portversion | grep '<' | wc -l | sed -e 's/ //g')" |
||
| 34 | updates="$(echo -n "${updates}")"
|
||
| 35 | |||
| 36 | echo "ports.value $updates" |
||
| 37 | |||
| 38 | exit 0 |
