summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/etc/rc.update_pkg_metadata4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/etc/rc.update_pkg_metadata b/src/etc/rc.update_pkg_metadata
index 518b00e..f22c1af 100755
--- a/src/etc/rc.update_pkg_metadata
+++ b/src/etc/rc.update_pkg_metadata
@@ -32,8 +32,10 @@ tmp_version=$(mktemp -q /tmp/${product}_version.XXXXXXXX) \
sleep $sleep_time \
&& /usr/local/sbin/${product}-upgrade -uf \
&& ( \
- /usr/local/sbin/${product}-upgrade -Uc | tail -n 1 > $tmp_version \
+ /usr/local/sbin/${product}-upgrade -Uc > ${tmp_version}.tmp \
; rc=$? \
+ ; tail -n 1 ${tmp_version}.tmp > $tmp_version \
+ ; rm -f ${tmp_version}.tmp \
; echo $rc > ${tmp_version}.rc \
; test $rc -eq 2 && return 0 || return $rc \
) \
OpenPOWER on IntegriCloud