public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Aaron Swenson" <titanofold@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pgsql-patches:initscripts commit in: /
Date: Sun, 18 Sep 2011 19:26:19 +0000 (UTC)	[thread overview]
Message-ID: <d522eeff49e2c428b9873e640e3a779a5bbf7731.titanofold@gentoo> (raw)

commit:     d522eeff49e2c428b9873e640e3a779a5bbf7731
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 18 19:25:41 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Sun Sep 18 19:25:41 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=d522eeff

Added {,/var}/run creation and updated README to match up with these files.

---
 README          |   30 +++++++++++++-----------------
 postgresql.init |   14 ++++++++++++--
 2 files changed, 25 insertions(+), 19 deletions(-)

diff --git a/README b/README
index 91a55f0..42cd086 100644
--- a/README
+++ b/README
@@ -1,22 +1,18 @@
-This repository is split into three primary branches.
+===========
+Initscripts
+===========
 
-Patches
--------------------------------------------------------------------------------
-The 'patches' branch is further split to match the major versions
-versions (a.k.a., slots). Pay attention to the tags as the signify the highest
-version they work with.
+postgresql.confd and postgresql.init have been written to condense the number of
+files that are necessary for maintenance. The dev-db/postgresql-server ebuilds
+sed the files replacing @SLOT@ with the proper slot number and @RUN@ with either
+/run or /var/run, depending on if /run exists.
 
-Those files are then manually rolled into a tarball and hosted at
-'http://d.g.o/~titanofold/'.
+These files are then manually tarballed and hosted at
+http://dev.gentoo.org/~titanofold/.
 
 
-Init Scripts
--------------------------------------------------------------------------------
-The 'initscripts' branch contains the initscripts. These scripts have been
-written to condense the number of files that are necessary for maintenance.
+Versioning
+==========
 
-
-Eselect Module
--------------------------------------------------------------------------------
-The 'eselect' branch contains the actual script for library and binary
-management.
+The minor version is incremented anytime a bug is fixed. The major version is
+incremented anytime a feature or capability is added.

diff --git a/postgresql.init b/postgresql.init
index ffd6c55..cda6d84 100644
--- a/postgresql.init
+++ b/postgresql.init
@@ -12,6 +12,7 @@ depend() {
 }
 
 checkconfig() {
+	# Check that DATA_DIR has been set and exists
 	if [ -z ${DATA_DIR} ] ; then
 		eerror "DATA_DIR not set"
 		eerror "HINT: Did you not update /etc/conf.d/postgresql-@SLOT@"
@@ -23,6 +24,8 @@ checkconfig() {
 		eerror "    emerge --config dev-db/postgresql-server:@SLOT@"
 		return 1
 	fi
+
+	# Check for the existence of and PostgreSQL's ability to read the config files.
 	if [ ! -f ${PGDATA}/postgresql.conf -o \
 		! -f ${PGDATA}/pg_hba.conf -o ! -f ${PGDATA}/pg_ident.conf ] ; then
 		eerror "The following file(s) were not found in ${PGDATA}:"
@@ -48,10 +51,17 @@ checkconfig() {
 		eerror "HINT: Try: 'chmod 644 ${PGDATA}/*.conf'"
 		return 1
 	fi
-	if [ -e /var/run/postgresql/.s.PGSQL.${PGPORT} ] ; then
+
+	# Ensures @RUN@/postgresql exists for those who have it on tmpfs.
+	local runpath="@RUN@/postgresql"
+	if [ ! -d ${runpath} ] ; then
+		mkdir -p ${runpath}
+		chown postgres:postgres ${runpath}
+	fi
+	if [ -e ${runpath}/.s.PGSQL.${PGPORT} ] ; then
 		eerror "Socket conflict."
 		eerror "A server is already listening on:"
-		eerror "    /var/run/postgresql/.s.PGSQL.${PGPORT}"
+		eerror "    ${runpath}/.s.PGSQL.${PGPORT}"
 		eerror "HINT: Change PGPORT to listen on a different socket."
 		return 1
 	fi



             reply	other threads:[~2011-09-18 19:26 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-18 19:26 Aaron Swenson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-04-23  1:52 [gentoo-commits] proj/pgsql-patches:initscripts commit in: / Mike Gilbert
2013-08-21  0:59 Aaron Swenson
2013-06-09  2:36 Aaron Swenson
2013-06-09  2:36 Aaron Swenson
2013-03-09 15:01 Aaron Swenson
2013-02-08 14:46 Aaron Swenson
2013-02-08 13:01 Aaron Swenson
2013-02-03 15:22 Aaron Swenson
2013-01-19 20:50 Aaron Swenson
2012-11-11 14:49 Aaron Swenson
2012-06-08 15:04 Aaron Swenson
2012-06-08 15:04 Aaron Swenson
2012-06-08 15:04 Aaron Swenson
2012-06-08 15:04 Aaron Swenson
2012-06-08 15:04 Aaron Swenson
2012-05-27 14:00 Aaron Swenson
2012-05-24 19:58 Aaron Swenson
2012-05-24 19:58 Aaron Swenson
2012-05-24 19:58 Aaron Swenson
2012-05-24 19:58 Aaron Swenson
2012-05-24 19:23 Aaron Swenson
2012-05-24 19:23 Aaron Swenson
2011-12-24 13:47 Aaron Swenson
2011-12-24 13:47 Aaron Swenson
2011-11-30 20:26 Aaron Swenson
2011-11-30 20:26 Aaron Swenson
2011-09-18 19:56 Aaron Swenson
2011-03-26 23:25 Aaron Swenson
2011-03-26 22:34 Aaron Swenson
2011-03-26  2:13 Aaron Swenson
2011-03-24 22:41 Aaron Swenson
2011-03-23  3:19 Aaron Swenson
2011-03-20  1:36 Aaron Swenson
2011-03-20  0:39 Aaron Swenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d522eeff49e2c428b9873e640e3a779a5bbf7731.titanofold@gentoo \
    --to=titanofold@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox