Use localstatedir macro for upgrade file
This commit is contained in:
parent
80fdd334dd
commit
dc3f6cc0ce
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue