fd7ccf97ee
Tgtd starts after OS boots up automatically, listens on the port 3260, which cause lio fails to bind the same port later. This patch removes the auto-start script of tgtd. In IPA service, lio or tgtd would be used to create iscsi target. If tgtd be chosen, IPA will start tgtd before iscsi setting. IF lio be chosen, tgtd would keep not running. Change-Id: Ic62055ac2f9252df832739631bfcbabfac0f9c4e Closes-Bug: #1554987
34 lines
713 B
Bash
Executable File
34 lines
713 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 git cloud-init
|
|
|
|
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
|
|
if [ -f /etc/init/tgt.conf ]; then
|
|
mv /etc/init/tgt.conf /etc/init/tgt.conf.disabled
|
|
fi
|
|
;;
|
|
systemd)
|
|
systemctl disable iptables.service
|
|
systemctl enable $(svc-map ironic-python-agent).service
|
|
;;
|
|
sysv)
|
|
update-rc.d iptables disable
|
|
;;
|
|
*)
|
|
echo "Unsupported init system"
|
|
exit 1
|
|
;;
|
|
esac
|