Uninstall postgresql95-server - postun server script failure - Mailing list pgsql-pkg-yum

From Marian Krucina
Subject Uninstall postgresql95-server - postun server script failure
Date
Msg-id CAP-0x-qdn-DJUyJGHajztquTGqJWrLJ7kdrgnhNqbvhah1kTEQ@mail.gmail.com
Whole thread Raw
List pgsql-pkg-yum
Hello,

command yum remove postgresql95-server on centos 6 (without systemd) print this error:


Running Transaction
  Erasing    : postgresql95-server-9.5.0-2PGDG.rhel6.x86_64                                                                                                                                                1/3
Non-fatal POSTUN scriptlet failure in rpm package postgresql95-server-9.5.0-2PGDG.rhel6.x86_64
  Erasing    : postgresql95-9.5.0-2PGDG.rhel6.x86_64                                                                                                                                                       2/3
/var/tmp/rpm-tmp.hE3kSH: line 4: syntax error near unexpected token `fi'
/var/tmp/rpm-tmp.hE3kSH: line 4: `fi'
warning: %postun(postgresql95-server-9.5.0-2PGDG.rhel6.x86_64) scriptlet failed, exit status 2
  Erasing    : postgresql95-libs-9.5.0-2PGDG.rhel6.x86_64                                                                                                                                                  3/3

Code:

if [ $1 -ge 1 ] ; then
 %if %{systemd_enabled}
    ....
 %endif
fi

Generate:

if [ $1 -ge 1 ] ; then
fi

And it fail.

Regards,
marian

pgsql-pkg-yum by date:

Previous
From: Devrim GÜNDÜZ
Date:
Subject: Re: pgRouting 2.1 why not available on PostgreSQL 9.5?
Next
From: John Harvey
Date:
Subject: Quick question about autogen.sh