jordansissel/fpm — Issue #129: Solaris postinstall script not working
Author: aaron-grewell
Created: 2011-11-30 00:23:11+00:00
State: open

When packaging the Zabbix agent I used the following:
fpm -s dir \
-t solaris \
--name zabbix-agent \
-v 1.8.8 \
-C /var/tmp/zabbix-agent \
--package zabbix-agent-VERSION.ARCH.pkg \
--maintainer "Aaron Grewell " \
--description "Zabbix is an all-in-one open source monitoring system" \
--url "http://www.zabbix.com" \
--post-install /var/tmp/zabbix-agent-post.sh \
--iteration 3 \
--config /etc/zabbix/agent.conf \
etc usr var

The package installation gives errors however:
# pkgadd -a puppet.admin -d zabbix-agent-1.8.8-3.i386.pkg zabbix-agent

Processing package instance from

zabbix-agent(i386) 1.8.8-3
Aaron Grewell
## Processing package information.
## Processing system information.
11 package pathnames are already properly installed.

Installing zabbix-agent as

## Installing part 1 of 1.
/etc/zabbix/agentd/userparameter_examples.conf
/etc/zabbix/agentd/userparameter_mysql.conf
/etc/zabbix/zabbix_agentd.conf
/usr/bin/zabbix_get
/usr/bin/zabbix_sender
/usr/sbin/zabbix_agent
/usr/sbin/zabbix_agentd
/usr/share/man/man1/zabbix_get.1
/usr/share/man/man1/zabbix_sender.1
/usr/share/man/man8/zabbix_agentd.8
/var/lib/zabbix/agent.xml
[ verifying class ]
## Executing postinstall script.
/var/sadm/pkg/zabbix-agent/install/postinstall: !: not found
/var/sadm/pkg/zabbix-agent/install/postinstall: !: not found
/var/sadm/pkg/zabbix-agent/install/postinstall: !: not found
/var/sadm/pkg/zabbix-agent/install/postinstall: !: not found

The postinstall script does not exist:
# ls -la /var/sadm/pkg/zabbix-agent/install/
total 2
drwxr-xr-x 2 root root 2 Nov 29 16:20 .
drwxr-xr-x 4 root root 5 Nov 29 16:20 ..