ironic-python-agent/imagebuild/tinyipa/build_files/bootlocal.sh
OpenStack Proposal Bot c40575e4e0 Add bash scripts style checking for IPA
Updated file tox.ini allows to check code style in all ".sh" files
included in Ironic Python Agent. Checking can be invoked by calling either
"tox" or "tox -e pep8".

Change-Id: Ie76605737c7db10a064f2aebfda388372a4c0591
Closes-Bug: #1625215
2016-11-09 14:14:40 -08:00

32 lines
664 B
Bash
Executable File

#!/bin/sh
# put other system startup commands here
#exec > /tmp/installlogs 2>&1
set -x
echo "Starting bootlocal script:"
date
export HOME=/root
# Start SSHd
if [ -f /usr/local/etc/init.d/openssh ]; then
echo "Starting OpenSSH server:"
/usr/local/etc/init.d/openssh start
fi
# Maybe save some RAM?
#rm -rf /tmp/builtin
# Install IPA and dependecies
if ! type "ironic-python-agent" > /dev/null ; then
python /tmp/get-pip.py --no-wheel --no-index --find-links=file:///tmp/wheelhouse ironic_python_agent
fi
export PYTHONOPTIMIZE=1
# Run IPA
echo "Starting Ironic Python Agent:"
date
ironic-python-agent 2>&1 | tee /var/log/ironic-python-agent.log