diff options
Diffstat (limited to 'scripts/rpm.daily')
-rwxr-xr-x | scripts/rpm.daily | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/rpm.daily b/scripts/rpm.daily new file mode 100755 index 0000000..3a199cc --- /dev/null +++ b/scripts/rpm.daily @@ -0,0 +1,13 @@ +#!/bin/sh + +tmpfile=`/bin/mktemp /var/log/rpmpkgs.XXXXXXXXX` || exit 1 +/bin/rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' 2>&1 \ + | /bin/sort > "$tmpfile" + +if [ ! -s "$tmpfile" ]; then + rm -f "$tmpfile" + exit 1 +fi + +/bin/mv "$tmpfile" /var/log/rpmpkgs +/bin/chmod 0644 /var/log/rpmpkgs |