diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/rpm.daily | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/rpm.daily b/scripts/rpm.daily index a3406436c..8a417a944 100755 --- a/scripts/rpm.daily +++ b/scripts/rpm.daily @@ -1,4 +1,9 @@ #!/bin/sh +tmpfile=`/bin/mktemp rpmpkgs.XXXXXXXXX` || exit 1 /bin/rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' 2>&1 \ - | /bin/sort > /var/log/rpmpkgs + | /bin/sort > "$tmpfile" + +[ -s "$tmpfile" ] || exit 1 +/bin/mv "$tmpfile" /var/log/rpmpkgs +/bin/chmod 0644 /var/log/rpmpkgs |