[devstack]Only cleanup tftp directory if ipxe disabled

There's no need to cleanup ironic-inspector.* if ipxe enabled

Change-Id: I07f981773441914105e006ef2133ae4cc05b1df9
This commit is contained in:
Zhenguo Niu 2016-07-15 11:32:42 +08:00
parent 74a259ce3b
commit 53f9534ece

View File

@ -274,10 +274,11 @@ function create_ironic_inspector_cache_dir {
}
function cleanup_inspector {
rm -f $IRONIC_TFTPBOOT_DIR/pxelinux.cfg/default
rm -f $IRONIC_TFTPBOOT_DIR/ironic-inspector.*
if [[ "$IRONIC_IPXE_ENABLED" == "True" ]] ; then
rm -f $IRONIC_HTTP_DIR/ironic-inspector.*
else
rm -f $IRONIC_TFTPBOOT_DIR/pxelinux.cfg/default
rm -f $IRONIC_TFTPBOOT_DIR/ironic-inspector.*
fi
sudo rm -f /etc/sudoers.d/ironic-inspector-rootwrap
sudo rm -rf $IRONIC_INSPECTOR_AUTH_CACHE_DIR