You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
426 B

#!/bin/sh
set -o noclobber
old=$PWD
cd $(dirname $(readlink -f "$0"))
cd ../
FLUXPLUGHOME=$PWD
. "$FLUXPLUGHOME"/master
cd $old
LINE=$("$APT" | "$AWK" -v myhost="$myhost" -v time=`date -u +%s%N` '{if ($1~/^Inst/) counter=counter+1} END {if (counter) printf "packages,host=%s packs=%si %s\n",myhost,counter,time}')
if [ -n "${LINE##+([[:space:]])}" ]; then # <= FIXME! find a better way.
writeline "$LINE" "$MAXLINES"
fi