diskimage-builder/elements/ironic-agent/post-install.d/80-ironic-agent
John Trowbridge db713fdf2d Add ability to build ironic-python-agent ramdisk from packages
Splits the install.d into source-install and package-install in
order to allow building from a distro packaged version of
ironic-python-agent.

Change-Id: I17513c29efd8c199e07ac1ef20ea5d7456585413
2015-07-31 14:04:52 +00:00

31 lines
663 B
Bash
Executable File

#!/bin/bash
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
install-packages -e python-dev git cloud-init
rm -rf /tmp/ironic-python-agent
case "$DIB_INIT_SYSTEM" in
upstart)
if [ -f /etc/init/ufw.conf ]; then
mv /etc/init/ufw.conf /etc/init/ufw.conf.disabled
fi
;;
systemd)
systemctl disable iptables.service
systemctl enable openstack-ironic-python-agent.service
;;
sysv)
update-rc.d iptables disable
update-rc.d openstack-ironic-python-agent enable
;;
*)
echo "Unsupported init system"
exit 1
;;
esac