[Mellanox] Disable MFT bash autocompletion (#17442)

A W/A to overcome delay of about 20 sec on login due to MFT bash autocompletion bug.
Should be reverted once a formal solution will be available in future MFT release.

- Why I did it
To overcome SN2700 20 sec delay on login

- How I did it
Removed MFT bash autocompletion part

- How to verify it
1. Build a mellanox image
2. Verify no such links after system boot.

Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
This commit is contained in:
Nazarii Hnydyn 2023-12-10 10:28:32 +02:00 committed by GitHub
parent b222c7c240
commit 278a958517
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,8 @@ DERIVED_TARGETS = mft-oem_$(MFT_VERSION)-$(MFT_REVISION)_$(CONFIGURED_ARCH).deb
DKMS_CTRL = /var/lib/dkms/kernel-mft-dkms/ DKMS_CTRL = /var/lib/dkms/kernel-mft-dkms/
DKMS_TMP := $(shell mktemp -u -d -t dkms.XXXXXXXXXX) DKMS_TMP := $(shell mktemp -u -d -t dkms.XXXXXXXXXX)
MFT_TMP = /tmp/mft_build/ MFT_DEB_TMP := $(shell mktemp -u -d -t mft.deb.XXXXXXXXXX)
MFT_TMP := $(shell mktemp -u -d -t mft.XXXXXXXXXX)
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
mkdir -p $(MFT_TMP) mkdir -p $(MFT_TMP)
@ -50,6 +51,19 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
wget -O $(MFT_TGZ) $(MFT_TGZ_URL) wget -O $(MFT_TGZ) $(MFT_TGZ_URL)
tar xzf $(MFT_TGZ) tar xzf $(MFT_TGZ)
# w/a: disable bash autocompletion
mkdir -p $(MFT_DEB_TMP)/DEBIAN
dpkg -e $(MFT_NAME)/DEBS/$(MAIN_TARGET) $(MFT_DEB_TMP)/DEBIAN
dpkg -x $(MFT_NAME)/DEBS/$(MAIN_TARGET) $(MFT_DEB_TMP)
rm -rf $(MFT_DEB_TMP)/etc/bash_completion.d
sed -i '/bash_completion.d/d' $(MFT_DEB_TMP)/DEBIAN/conffiles
dpkg -b $(MFT_DEB_TMP) $(MFT_NAME)/DEBS/$(MAIN_TARGET)
rm -rf $(MFT_DEB_TMP)
# fix timestamp # fix timestamp
touch $(MFT_NAME)/DEBS/*.deb touch $(MFT_NAME)/DEBS/*.deb
mv $(MFT_NAME)/DEBS/*.deb $(DEST) mv $(MFT_NAME)/DEBS/*.deb $(DEST)