On Fri, Jun 25, 2010 at 01:49:32PM +0200, Dejan Muhamedagic wrote:
> On Fri, Jun 25, 2010 at 12:58:15PM +0200, Lars Ellenberg wrote:
> > On Thu, Jun 24, 2010 at 11:59:55AM -0600, Serge Dubrouski wrote:
> > > Attached is an improved patch.
> > > 
> > > 1. It parses unix_socket_directory out from PostgreSQL configuration
> > > file and used its value as a default value of OCF_RESKEY_socketdir.
> > > (Perl is used for that)
> > 
> > sed -n  -e 's/#.*$//; s/[[:space:]]*$//;' \
> >     -e 's/^[[:space:]]*'"$parameter"'[[:space:]=]\+[[:space:]]*//p;' 
> > postgresql.conf |
> >     tail -n1
> > should do it, too.
> 
> Isn't then the last s command enough?

First strip optional inline comments and possibly trailing whitespace.
Yes, you could put it in one s///, with s/...()(|)/\1/p, but
that won't get more readable.

> I believe that it was in case the directory was in /var/run/
> which is cleaned on boot.

Bad choice, then ;-)
Choose differently, or re-create it on boot.
Ah well, or patch the resource agent.
Whatever works best.

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to