text patch -- sugg cmd when run as root

Поиск
Список
Период
Сортировка
От Brett McCormick
Тема text patch -- sugg cmd when run as root
Дата
Msg-id 13639.60042.286250.205084@abraxas.scene.com
обсуждение исходный текст
Ответы Re: [HACKERS] text patch -- sugg cmd when run as root  (dg@illustra.com (David Gould))
Re: [HACKERS] text patch -- sugg cmd when run as root  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
When you run postgresql as root, the command it gives for putting in
your startup script is a little weird.  The main issue is that 2>&1
only works in bash, not tcsh.  >& works in both, so it seems
preferable.  Another minor issue is that it echoes the command and
pipes it through su.  Shouldn't this be "su - postgres -c 'cmd'"?  Do
all versions of su have the '-c' argument?  piping it through seems
weird, but maybe it isn't.

this is a straight diff for src/backend/main/main.c

--cut here--
38c38
< echo \"postmaster -B 256 >/var/log/pglog 2>&1 &\" | su - postgres\n\n"
---
> su - postgres -c 'postmaster -B 256 >& /var/log/pglog' &\n\n"
--cut here--

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] removing the exec() from doexec()
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] Unlock the vacuum