3 tmpfile=`/bin/mktemp /var/log/rpmpkgs.XXXXXXXXX` || exit 1
4 /bin/rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' 2>&1 \
5 | /bin/sort > "$tmpfile"
7 if [ ! -s "$tmpfile" ]; then
12 /bin/mv "$tmpfile" /var/log/rpmpkgs
13 /bin/chmod 0644 /var/log/rpmpkgs