diskimage-builder/elements/ironic-agent/post-install.d/80-ironic-agent
Yuriy Zveryanskyy 676b1b738d Add element for building ramdisk with ironic-python-agent
This element creates kernel and ramdisk files based on Fedora,
example:
disk-image-create -a i386 -o test fedora ironic-agent disable-selinux

Change-Id: Ifa133d1680b81cb87d32a405aa7d7b40fe91f835
2014-11-13 19:30:44 +02:00

17 lines
420 B
Bash
Executable file

#!/bin/bash
set -eu
set -o pipefail
install-packages -e python-dev git cloud-init
rm -rf /tmp/ironic-python-agent
sudo systemctl disable iptables.service
#configs for additional interfaces
SYSCONFIG_PATH=/etc/sysconfig/network-scripts
for IFACE_NUM in 1 2
do
sudo cp $SYSCONFIG_PATH/ifcfg-eth0 $SYSCONFIG_PATH/ifcfg-eth$IFACE_NUM
sudo sed -i "s/eth0/eth$IFACE_NUM/g" $SYSCONFIG_PATH/ifcfg-eth$IFACE_NUM
done