Skip to content

Commit 46bd020

Browse files
authored
Merge pull request #2574 from k8s-infra-cherrypick-robot/cherry-pick-2572-to-release-1.33
[release-1.33] fix: avoid installing aznfs when linux distribution is not supported
2 parents da227f8 + 6d1add6 commit 46bd020

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

pkg/azurefile-proxy/init.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,11 @@ DISTRIBUTION=$($HOST_CMD cat /etc/os-release | grep ^ID= | cut -d'=' -f2 | tr -d
3131
ARCH=$($HOST_CMD uname -m)
3232
echo "Linux distribution: $DISTRIBUTION, Arch: $ARCH"
3333

34+
# Only install aznfs-mount on ubuntu and azurelinux
35+
if [ "$DISTRIBUTION" != "azurelinux" ] && [ "$DISTRIBUTION" != "ubuntu" ];then
36+
echo "aznfs-mount is not supported on Linux distribution: $DISTRIBUTION"
37+
exit 0
38+
fi
39+
3440
. ./azurefile-proxy/install-proxy.sh
3541

pkg/azurefile-proxy/install-proxy.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ if [ "${INSTALL_AZNFS_MOUNT}" = "true" ];then
3939
AZNFS_VERSION="0.1.548"
4040
echo "install aznfs v$AZNFS_VERSION...."
4141
$HOST_CMD curl -fsSL https://github.com/Azure/AZNFS-mount/releases/download/$AZNFS_VERSION/aznfs_install.sh | $HOST_CMD bash
42+
else
43+
echo "aznfs-mount is not supported on Linux distribution: $DISTRIBUTION"
44+
exit 0
4245
fi
4346

4447
# Only install aznfswatchdogv4, so aznfswatchdogv3 is not needed

0 commit comments

Comments
 (0)