agent: ensure vmlinuz file does not exist before hard-linking into it

Otherwise on rebuilding the agent the following error is produced:
    failed to create hard link /home/stack/ironic-agent.vmlinuz
and the vmlinuz file is not updated.

Change-Id: I2015da889c932a854727235b1e34256a28e9eac6
This commit is contained in:
Dmitry Tantsur 2015-09-30 11:37:28 +02:00
parent 8e3f01fe82
commit afda063697

View File

@ -30,4 +30,5 @@ sudo cp $BOOTDIR/$KERNEL ${IMAGE_PATH}.kernel
# it backward compatible. Remove it after it has been consistent and # it backward compatible. Remove it after it has been consistent and
# documented in both places for at least one full OpenStack release cycle # documented in both places for at least one full OpenStack release cycle
echo "WARNING: The kernel extension .vmlinuz has been deprecated. Please rely on the file with the extension .kernel instead." echo "WARNING: The kernel extension .vmlinuz has been deprecated. Please rely on the file with the extension .kernel instead."
sudo rm -f ${IMAGE_PATH}.vmlinuz
sudo ln ${IMAGE_PATH}.kernel ${IMAGE_PATH}.vmlinuz sudo ln ${IMAGE_PATH}.kernel ${IMAGE_PATH}.vmlinuz