diskimage-builder/elements/ironic-agent/post-install.d/80-ironic-agent
Dmitry Tantsur 5f68750b4b ironic-agent: ensure dmidecode and ipmitool are installed
Currently they are used for inspection, but may be also used for
other purposes, as they're accessed from IPA generic hardware layer.

Change-Id: I32c6a711d466131b9445023812a2a260ed2e01f3
2015-09-01 17:39:51 +02:00

37 lines
946 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
# dnf removes unused dependencies by default. As we installed cloud-init before
# dmidecode, dnf removes dmidecode above as an unused dependency.
# TODO(dtantsur): use `dnf mark` from dnf 1.1.1 in install-packages once this
# command is widely available.
install-packages dmidecode
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