Re: Is `#!/bin/sh' configurable?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Is `#!/bin/sh' configurable?
Дата
Msg-id 200105081628.f48GS8b04551@candle.pha.pa.us
обсуждение исходный текст
Ответ на Is `#!/bin/sh' configurable?  (Alexander Klimov <ask@wisdom.weizmann.ac.il>)
Список pgsql-hackers
> Hi.
>
> On some systems /bin/sh is not Burne Shell, e.g. /bin/sh is tcsh, but
> there is /bin/sh5. It is looks like there is already knowledge about it in
> the system: Makefile.ultrix4 has `SHELL=/bin/sh5' in it, but configure
> thinks something else: config.status has `s%@SHELL@%/bin/sh%g'. (This is
> really unrelated, because `src/bin/initdb/initdb.sh' has `#! /bin/sh'
> hardcoded in it)

Actually, Makefile.ultrix will override what is in config.status, so
that part is OK.

>
> The result of the mess is that scripts like initdb are installed with
> `#!/bin/sh', but they has function definition and tcsh complain about
> usage of '('.

It is hard to feel sorry for OS's that have /bin/sh as something that is
not at least moderately compatible with the Bourne sh.

However, I am applying the following patch to allow SHELL set in
Makefile.* to control what is used by initdb.  I have not changed any
other commands because I don't want to start making this change all over
when it is not necessary.

> BTW: After hand substitution I reach the point of
> IpcSemaphoreCreate: semget(key=4, num=17, 03600) failed: No space left on
> device
> The problem is that I have no idea how to enlarge the parameters on
> `ULTRIX black 4.3 1 RISC', and it is looks like PG has no FAQ for
> it. Anybody knows how to do it?

Sorry, I don't know.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
Index: src/bin/initdb/Makefile
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/bin/initdb/Makefile,v
retrieving revision 1.25
diff -c -r1.25 Makefile
*** src/bin/initdb/Makefile    2001/02/18 18:33:59    1.25
--- src/bin/initdb/Makefile    2001/05/08 16:16:54
***************
*** 18,23 ****
--- 18,24 ----
  initdb: initdb.sh $(top_builddir)/src/Makefile.global
      sed -e 's/@MULTIBYTE@/$(MULTIBYTE)/g' \
          -e 's/@VERSION@/$(VERSION)/g' \
+         -e 's,@SHELL@,$(SHELL),g' \
          -e 's,@bindir@,$(bindir),g' \
          -e 's,@datadir@,$(datadir),g' \
        $< >$@
Index: src/bin/initdb/initdb.sh
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/bin/initdb/initdb.sh,v
retrieving revision 1.123
diff -c -r1.123 initdb.sh
*** src/bin/initdb/initdb.sh    2001/03/27 05:45:50    1.123
--- src/bin/initdb/initdb.sh    2001/05/08 16:16:54
***************
*** 1,4 ****
! #! /bin/sh
  #-------------------------------------------------------------------------
  #
  # initdb creates (initializes) a PostgreSQL database cluster (site,
--- 1,4 ----
! #!@SHELL@
  #-------------------------------------------------------------------------
  #
  # initdb creates (initializes) a PostgreSQL database cluster (site,

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Is `#!/bin/sh' configurable?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Where `gcc -MMD' puts .d files