Обсуждение: Uninstall postgresql95-server - postun server script failure

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

Uninstall postgresql95-server - postun server script failure

От
Marian Krucina
Дата:
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