Josh Berkus writes:
> initdb.patch, written by Shridhar, patches initdb so that the LC_*
> localization variables are inserted into postgresql.conf at the point
> commented "#LC VARS GO HERE!"
It's pretty pointless to use
cat $file | sed 's/.../'
because sed can open files perfectly well:
sed 's/.../' $file
You should clean up the temp files in exit_nicely(), because if someone or
something aborts initdb in the middle, then the trap will at least have a
better chance to remove the files.
Actually, I doubt that it's safe and/or polite to write temporary files in
the current directory. If you want to see a better way to handle
temporary files in shell scripts, look in configure near occurences of
'mktemp'.
> As I'm not great a patch-making, I've also attached the completed
> postgresql.conf.sample for reference.
Use diff -c instead of plain diff and put the old file first and the new
file second.
--
Peter Eisentraut peter_e@gmx.net