postgresql-setup: work even if $PATH is unset or empty
.. by setting $PATH to default value. Also check for command existence by 'command' built-in instead of checking for file existence. Version: 9.3.4-2 Resolves: #1097317
This commit is contained in:
parent
d7e5562ac1
commit
533a1efbb6
@ -2,6 +2,8 @@
|
|||||||
#
|
#
|
||||||
# postgresql-setup - Initialization and upgrade operations for PostgreSQL
|
# postgresql-setup - Initialization and upgrade operations for PostgreSQL
|
||||||
|
|
||||||
|
test -z "$PATH" && export PATH="/sbin:/usr/sbin:/bin:/usr/bin"
|
||||||
|
|
||||||
test x"$PGSETUP_DEBUG" != x && set -x
|
test x"$PGSETUP_DEBUG" != x && set -x
|
||||||
|
|
||||||
# PGVERSION is the full package version, e.g., 9.0.2
|
# PGVERSION is the full package version, e.g., 9.0.2
|
||||||
@ -100,7 +102,7 @@ export PGDATA
|
|||||||
export PGPORT
|
export PGPORT
|
||||||
|
|
||||||
# For SELinux we need to use 'runuser' not 'su'
|
# For SELinux we need to use 'runuser' not 'su'
|
||||||
if [ -x /sbin/runuser ]; then
|
if command -v runuser &>/dev/null; then
|
||||||
SU=runuser
|
SU=runuser
|
||||||
else
|
else
|
||||||
SU=su
|
SU=su
|
||||||
|
@ -64,7 +64,7 @@ Summary: PostgreSQL client programs
|
|||||||
Name: postgresql
|
Name: postgresql
|
||||||
%global majorversion 9.3
|
%global majorversion 9.3
|
||||||
Version: 9.3.4
|
Version: 9.3.4
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
|
|
||||||
# The PostgreSQL license is very similar to other MIT licenses, but the OSI
|
# The PostgreSQL license is very similar to other MIT licenses, but the OSI
|
||||||
# recognizes it as an independent license, so we do as well.
|
# recognizes it as an independent license, so we do as well.
|
||||||
@ -1131,6 +1131,9 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed May 14 2014 Pavel Raiskup <praiskup@redhat.com> - 9.3.4-2
|
||||||
|
- set basic $PATH when it is empty or unset, (#1097317)
|
||||||
|
|
||||||
* Thu Mar 20 2014 Jozef Mlich <jmlich@redhat.com> - 9.3.4-1
|
* Thu Mar 20 2014 Jozef Mlich <jmlich@redhat.com> - 9.3.4-1
|
||||||
- update to 9.3.4 minor version per release notes:
|
- update to 9.3.4 minor version per release notes:
|
||||||
http://www.postgresql.org/docs/9.3/static/release-9-3-4.html
|
http://www.postgresql.org/docs/9.3/static/release-9-3-4.html
|
||||||
|
Loading…
Reference in New Issue
Block a user