From dc3f6cc0ce4a775e8a63f69ffffcc9e59bc70abd Mon Sep 17 00:00:00 2001 From: Sam Kottler Date: Thu, 23 Jan 2014 17:30:14 +0000 Subject: [PATCH] Use localstatedir macro for upgrade file --- puppet.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/puppet.spec b/puppet.spec index 38a1feb..0cc7056 100644 --- a/puppet.spec +++ b/puppet.spec @@ -13,7 +13,8 @@ %global _with_systemd 1 %global confdir ext/redhat -%global pending_upgrade_file /tmp/puppet_pending_upgrade +%global pending_upgrade_path %{_localstatedir}/lib/rpm-state/puppet +%global pending_upgrade_file %{pending_upgrade_path}/upgrade_pending Name: puppet Version: 3.4.2 @@ -319,6 +320,9 @@ if [ "$1" == "1" ]; then /bin/systemctl stop puppetagent.service > /dev/null 2>&1 ||: /bin/systemctl daemon-reload >/dev/null 2>&1 ||: if [ ! -e %{pending_upgrade_file} ]; then + if [ ! -d %{pending_upgrade_path} ]; then + mkdir %{pending_upgrade_path} + end touch %{pending_upgrade_file} fi fi