aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron W. Swenson <titanofold@gentoo.org>2012-05-24 15:56:00 -0400
committerAaron W. Swenson <titanofold@gentoo.org>2012-05-24 15:56:00 -0400
commitb53e8b00b876c4b28bf4df30d32f505b8ec565db (patch)
tree969c3b8c001ca5f30839153565af193ba10f8379
parentMissed a path variable. (diff)
downloadpatches-b53e8b00b876c4b28bf4df30d32f505b8ec565db.tar.gz
patches-b53e8b00b876c4b28bf4df30d32f505b8ec565db.tar.bz2
patches-b53e8b00b876c4b28bf4df30d32f505b8ec565db.zip
Just bail out if one of the configuration files is missing. The hint
directs them to move over '*.conf' anyway.
-rwxr-xr-xpostgresql.init9
1 files changed, 2 insertions, 7 deletions
diff --git a/postgresql.init b/postgresql.init
index 8217299..1dabe2b 100755
--- a/postgresql.init
+++ b/postgresql.init
@@ -41,21 +41,16 @@ checkconfig() {
# Check for the existence of PostgreSQL's config files.
local file
- local status=0
for file in postgresql pg_hba pg_ident ; do
file="${PGDATA%/}/${file}.conf"
if [ -f ${file} ] ; then
checkpath -f -m 0600 -o postgres:postgres ${file}
else
eerror "${file} not found"
- status=1
+ eerror "HINT: mv ${DATA_DIR%/}/*.conf ${PGDATA}"
+ return 1
fi
done
- if [ ${status} -eq 1 ] ; then
- eerror "HINT: Try:"
- eerror " mv ${DATA_DIR%/}/*.conf ${PGDATA}"
- return 1
- fi
# Check the socket directory
checkpath -d -m 0770 -o postgres:postgres ${socket_path}