Bug 84095

Summary: Bug in script on PostGreSQL
Product: Ports & Packages Reporter: goffredo
Component: Individual Port(s)Assignee: Palle Girgensohn <girgen>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description goffredo 2005-07-25 22:50:04 UTC
%/usr/local/etc/rc.d/010.pgsql.sh initdb
su: /bin/bash: No such file or directory
%

Is looking for bash in /bin/bash. Or, is using bash instead /bin/sh.

Fix: 

Find where is using /bin/bash and replace with /bin/sh
How-To-Repeat: Run:

/usr/local/etc/rc.d/010.pgsql.sh initdb
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2005-07-25 23:22:06 UTC
Responsible Changed
From-To: freebsd-ports-bugs->girgen

Over to maintainer of databases/postgresql73-server et. al.
Comment 2 Palle Girgensohn freebsd_committer freebsd_triage 2005-07-26 14:23:53 UTC
State Changed
From-To: open->feedback

Hi! 

This is odd, since initdb is a binary, it does not make use of 
bash. Hence I feel the most likely reason is that /bin/bash is 
introduced somehow in /etc/passwd, perhaps for the pgsql user, or 
root? 

What does 

$ grep pgsql /etc/passwd  

reveal? and ditto for root? The cuplrit is problaby the su in this 
line: 

su -l -c ${postgresql_class} ${postgresql_user}  
-c "exec ${prefix}/bin/initdb -D ${postgresql_data}"
Comment 3 Palle Girgensohn freebsd_committer freebsd_triage 2005-07-26 18:32:21 UTC
State Changed
From-To: feedback->closed

% ypcat passwd | grep pgsql 
pgsql:*:70:70:PostgreSQL Daemon:/usr/local/pgsql:/bin/bash 

The old sysadm made this mess. He don't use the defaults, and 
created some mess. 

Case closed.