[
http://jira.codehaus.org/browse/MRPM-24?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brett Okken updated MRPM-24:
----------------------------
Assignee: Brett Okken
Remaining Estimate: 0 minutes
Original Estimate: 0 minutes
I am closing this issue since the functionality appears to be available in the
appassembler-maven-plugin. If there is something missing that truly is specific
to rpm, the issue can be re-opened.
> Add support for init.d script addition and removal
> ---------------------------------------------------
>
> Key: MRPM-24
> URL: http://jira.codehaus.org/browse/MRPM-24
> Project: Mojo RPM Plugin
> Issue Type: Improvement
> Components: rpm
> Environment: linux (fedora and redhat)
> Reporter: Erik Drolshammer
> Assignee: Brett Okken
> Original Estimate: 0 minutes
> Remaining Estimate: 0 minutes
>
> When installing java applications with rpm we often want init.d scripts as
> well. This is not difficult using bash scripting, but it is error prone and
> hard to reuse across projects.
> Would it be possible to add support to the rpm-maven-plugin for this?
> For example add these as bash-scripts and add a property
> "generateInitDScripts" (true/false) to enable disabled them?
> They must of course be removed when removing the rpm package.
> Below is a suggestion for bash script.
> <postinstall>
> echo Configuring ${pom.name} init scripts
> #!/bin/sh
> #echo RPM_INSTALL_PREFIX: $RPM_INSTALL_PREFIX
> #echo prefix: %{prefix}
> ln -s $RPM_INSTALL_PREFIX/bin/${rpm.appname}
> /etc/init.d/${rpm.appname}
> #update-rc.d ${rpm.appname} start 20 3 5 . stop 20 0 1 2 4 6 .
> # configure chkconfig install
> if [ -x /sbin/chkconfig ]; then
> /sbin/chkconfig --add ${rpm.appname}
> else
> ln -sf /etc/init.d/${rpm.appname}
> /etc/rc.d/rc3.d/S20${rpm.appname}
> ln -sf /etc/init.d/${rpm.appname}
> /etc/rc.d/rc5.d/S20${rpm.appname}
> ln -sf /etc/init.d/${rpm.appname}
> /etc/rc.d/rc0.d/K10${rpm.appname}
> ln -sf /etc/init.d/${rpm.appname}
> /etc/rc.d/rc1.d/K10${rpm.appname}
> ln -sf /etc/init.d/${rpm.appname}
> /etc/rc.d/rc2.d/K10${rpm.appname}
> ln -sf /etc/init.d/${rpm.appname}
> /etc/rc.d/rc4.d/K10${rpm.appname}
> ln -sf /etc/init.d/${rpm.appname}
> /etc/rc.d/rc6.d/K10${rpm.appname}
> fi
> </postinstall>
> <preremove>
> echo Removing ${rpm.appname} ...
> #chkconfig scripts removal
> #only on uninstall, not on upgrades.
> if [ $1 = 0 ]; then
> /etc/init.d/${rpm.appname} stop
> if [ -x /sbin/chkconfig ]; then
> echo "chkconfig --del ${rpm.appname}"
> /sbin/chkconfig --del ${rpm.appname}
> else
> echo "Deleting /etc/rc.d/rc?.d/???${rpm.appname}"
> rm -f /etc/rc.d/rc?.d/???${rpm.appname}
> fi
> fi
> </preremove>
> <postremove>
> echo "Deleting /etc/init.d/${rpm.appname}"
> rm /etc/init.d/${rpm.appname}
> echo ${rpm.appname} is Successfully Removed!
> </postremove>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email