Merge "[ironic-agent] Use svc-map for enabling agent"

This commit is contained in:
Jenkins 2015-09-03 15:05:24 +00:00 committed by Gerrit Code Review
commit b2fd0f3ad7
6 changed files with 15 additions and 5 deletions

View File

@ -16,5 +16,10 @@ Beyond installing the ironic-python-agent, this element does the following:
in order to support source based installation of ironic-python-agent and its
dependencies.
.. note::
The package based install currently only enables the service when using the
systemd init system. This can easily be changed if there is an agent
package which includes upstart or sysv packaging.
.. note::
Using the ramdisk will require at least 1.5GB of ram

View File

@ -1,2 +1,5 @@
dhcp-all-interfaces
package-installs
pkg-map
source-repositories
svc-map

View File

@ -28,8 +28,7 @@ case "$DIB_INIT_SYSTEM" in
install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.conf /etc/init/ironic-python-agent.conf
;;
systemd)
install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.service /usr/lib/systemd/system/ironic-python-agent.service
systemctl enable ironic-python-agent.service
install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.service /usr/lib/systemd/system/$(svc-map ironic-python-agent).service
;;
sysv)
install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.init /etc/init.d/ironic-python-agent.init

View File

@ -14,7 +14,7 @@ umask 022
expect stop
pre-start script
echo Starting Ironic Python Agnet
echo Starting Ironic Python Agent
end script
exec /usr/bin/ironic-python-agent

View File

@ -23,11 +23,10 @@ case "$DIB_INIT_SYSTEM" in
;;
systemd)
systemctl disable iptables.service
systemctl enable openstack-ironic-python-agent.service
systemctl enable $(svc-map ironic-python-agent).service
;;
sysv)
update-rc.d iptables disable
update-rc.d openstack-ironic-python-agent enable
;;
*)
echo "Unsupported init system"

View File

@ -0,0 +1,4 @@
ironic-python-agent:
default: openstack-ironic-python-agent
redhat: openstack-ironic-python-agent
debian: ironic-python-agent