Обсуждение: Re: Eliminating start error message: "unary operator

Поиск
Список
Период
Сортировка

Re: Eliminating start error message: "unary operator

От
"Carlos Oliva"
Дата:
Hi Tom,
I got this in standard out.  I also included the output in a text file

I run the following command:
sh -x /etc/rc.d/init.d/postgresql start

Thanks for your help


+ PGVERSION=7.3
+ INITD=/etc/rc.d/init.d
+ . /etc/rc.d/init.d/functions
++ TEXTDOMAIN=initscripts
++ TEXTDOMAINDIR=/etc/locale
++ umask 022
++ export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
++ '[' -z '' ']'
++ COLUMNS=80
++ '[' -f /etc/sysconfig/i18n -a -z '' ']'
++ . /etc/sysconfig/i18n
+++ LANG=en_US.iso885915
+++ SUPPORTED=en_US.iso885915:en_US:en
+++ SYSFONT=lat0-sun16
+++ SYSFONTACM=iso15
+++ /sbin/consoletype
++ '[' en_US.iso885915 = ja_JP.eucJP -a pty '!=' pty ']'
+++ /sbin/consoletype
++ '[' en_US.iso885915 = ko_KR.eucKR -a pty '!=' pty ']'
+++ /sbin/consoletype
++ '[' en_US.iso885915 = zh_CN.GB2312 -a pty '!=' pty ']'
+++ /sbin/consoletype
++ '[' en_US.iso885915 = zh_TW.Big5 -a pty '!=' pty ']'
++ export LANG
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/init ']'
++ . /etc/sysconfig/init
+++ BOOTUP=color
+++ RES_COL=60
+++ MOVE_TO_COL=echo -en \033[60G
+++ SETCOLOR_SUCCESS=echo -en \033[1;32m
+++ SETCOLOR_FAILURE=echo -en \033[1;31m
+++ SETCOLOR_WARNING=echo -en \033[1;33m
+++ SETCOLOR_NORMAL=echo -en \033[0;39m
+++ LOGLEVEL=3
+++ PROMPT=yes
++ '[' -x /sbin/consoletype ']'
+++ consoletype
++ '[' pty = serial ']'
++ '[' color '!=' verbose ']'
++ INITLOG_ARGS=-q
++ typeset -F
+ TYPESET=declare -f action
declare -f checkpid
declare -f confirm
declare -f daemon
declare -f echo_failure
declare -f echo_passed
declare -f echo_success
declare -f echo_warning
declare -f failure
declare -f killproc
declare -f passed
declare -f pidfileofproc
declare -f pidofproc
declare -f status
declare -f strstr
declare -f success
declare -f warning
+ . /etc/sysconfig/network
++ NETWORKING=yes
++ HOSTNAME=buyemr.pbsinet.com
++ GATEWAY=209.4.117.159
++ basename /etc/rc.d/init.d/postgresql
+ NAME=postgresql
+ PGPORT=5432
+ export PGDATA=/var/lib/pgsql
+ PGDATA=/var/lib/pgsql
+ '[' -f /var/lib/pgsql/PG_VERSION ']'
+ export PGDATA=/var/lib/pgsql/data
+ PGDATA=/var/lib/pgsql/data
+ '[' -f /etc/sysconfig/pgsql/postgresql ']'
+ export PGDATA
+ export PGPORT
+ export PGOPTS
+ '[' yes = no ']'
+ '[' -f /usr/bin/postmaster ']'
+ start
+ PSQL_START=Starting postgresql service:
+ '[' -f /var/lib/pgsql/data/PG_VERSION ']'
+ '[' -d /var/lib/pgsql/data/base ']'
++ cat /var/lib/pgsql/data/PG_VERSION
+ '[' 7.3 '!=' 7.3 ']'
++ pidof -s /usr/bin/postmaster
+ pid=
+ '[' ']'
+ rm -f /tmp/.s.PGSQL.5432
+ echo -n 'Starting postgresql service: '
Starting postgresql service: + su -l postgres -s /bin/sh -c
'/usr/bin/pg_ctl  -D
 /var/lib/pgsql/data -p /usr/bin/postmaster -o '\''-p 5432'\'' start  >
/dev/nul
l 2>&1'
standard in must be a tty
+ sleep 1
++ pidof -s /usr/bin/postmaster
+ pid=
+ '[' ']'
+ echo 'declare -f action
declare -f checkpid
declare -f confirm
declare -f daemon
declare -f echo_failure
declare -f echo_passed
declare -f echo_success
declare -f echo_warning
declare -f failure
declare -f killproc
declare -f passed
declare -f pidfileofproc
declare -f pidofproc
declare -f status
declare -f strstr
declare -f success
declare -f warning'
+ grep 'declare -f failure'
+ failure 'Starting postgresql service: '
+ rc=0
+ '[' -z '' ']'
+ initlog -q -n /etc/rc.d/init.d/postgresql -s 'Starting postgresql
service: ' -
e 2
+ '[' color '!=' verbose -a -z '' ']'
+ echo_failure
+ '[' color = color ']'
+ echo -en '\033[60G'
                                                           + echo -n '['
[+ '[' color = color ']'
+ echo -en '\033[1;31m'
+ echo -n FAILED
FAILED+ '[' color = color ']'
+ echo -en '\033[0;39m'
+ echo -n ']'
]+ echo -ne '\r'
+ return 1
+ return 0
+ echo

+ exit 0

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Tom Lane
Sent: Monday, June 23, 2003 4:46 PM
To: Carlos
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Eliminating start error message: "unary operator


"Carlos Oliva" <carlos@pbsinet.com> writes:
> There it goes.  I also enclosed it in a text file.

There's nothing obviously wrong there ... maybe the problem is in one of
the files it includes?

I'd suggest running the script by hand via "sh -x initscript" so we can
determine exactly which line is causing the problem.

            regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

Вложения

Re: Eliminating start error message: "unary operator

От
Tom Lane
Дата:
"Carlos Oliva" <carlos@pbsinet.com> writes:
> I got this in standard out.  I also included the output in a text file

I don't see the complaint anywhere in there, though?

Also, it looks like this failed because postmaster was already running.
You probably need to stop the postmaster and then try the sh -x.
Don't forget to pipe both stdout and stderr into the same file, eg
    sh -x /etc/rc.d/init.d/postgresql start >mylog 2>&1

            regards, tom lane