[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: su -c now fatal on Mac? was Re: [Gnumed-devel] GNUmed 0.9.1 Relea

From: Sebastian Hilbert
Subject: Re: su -c now fatal on Mac? was Re: [Gnumed-devel] GNUmed 0.9.1 Release
Date: Fri, 8 Apr 2011 12:12:39 +0200
User-agent: KMail/1.13.6 (Linux/; KDE/4.6.0; i686; ; )

Am Freitag, 8. April 2011, 10:44:24 schrieb Jim Busser:
> Not sure why I now get something different:
> Last login: Fri Apr  8 01:10:07 on ttys000
> MacBook:~ djb$ sudo -i
> MacBook:~ root# echo $PATH
> /bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin
> MacBook:~ root# cd
> '/Users/djb/Downloads/gnumed-server.15.1/server/bootstrap/'
> MacBook:bootstrap root# sh ./ 14 15
> su: unknown login: psql -l

I guess because you are now root su starts to interpret the line but fails.

What you need to do is to find the line where the su stuff is happening and 
have a good look at it.

Then try  to run that line manually in a shell
It will give all kinds of error e.g. because -c is missing.

So you need to find out if su on Mac can run a command (equivalen to -c) and 
maybe rearrange the contents of the line until it does what is is supposed to.

# Does source database exist ?
VER_EXISTS=`su -c "psql -l ${PORT_DEF}" -l postgres | grep ${TEMPLATE_DB}`

Either  comment line to skip the check or look at it carefully and make it do 

1.) use su
2.) make su run this the command enclosed in ""   == the -c part

You can test this by running.

su -c "psql -l -p 5432" -l postgres | grep template1

su become root and then becom postgres, then run 'psql -l -p5432'

Let us know what happens


> _______________________________________________
> Gnumed-devel mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]