2014-06-27 11:54:29 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2014-09-04 04:56:29 +00:00
|
|
|
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
2014-06-27 11:54:29 +00:00
|
|
|
set -eu
|
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
install-packages -e python-dev git cloud-init
|
2015-08-11 11:11:28 +00:00
|
|
|
|
2014-06-27 11:54:29 +00:00
|
|
|
rm -rf /tmp/ironic-python-agent
|
|
|
|
|
2015-07-06 15:14:54 +00:00
|
|
|
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
|
2015-08-31 14:27:44 +00:00
|
|
|
systemctl enable $(svc-map ironic-python-agent).service
|
2015-07-06 15:14:54 +00:00
|
|
|
;;
|
|
|
|
sysv)
|
|
|
|
update-rc.d iptables disable
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Unsupported init system"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|