Skip to content

Commit 7745036

Browse files
committed
chore: support install specific blobfuse version using blobfuse-proxy
install blobfuse2
1 parent 88a5139 commit 7745036

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

pkg/blobfuse-proxy/init.sh

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,35 @@ READ_AHEAD_KB=${READ_AHEAD_KB:-15380}
2525

2626
HOST_CMD="nsenter --mount=/proc/1/ns/mnt"
2727

28-
# install/update blobfuse
29-
if [ "${INSTALL_BLOBFUSE}" = "true" ]
28+
if [ "${INSTALL_BLOBFUSE}" = "true" ] || [ "${INSTALL_BLOBFUSE2}" = "true" ]
3029
then
3130
cp /blobfuse-proxy/packages-microsoft-prod.deb /host/etc/
32-
yes | $HOST_CMD dpkg -i /etc/packages-microsoft-prod.deb && \
33-
$HOST_CMD apt update && \
34-
$HOST_CMD apt-get install -y fuse blobfuse2 blobfuse="${BLOBFUSE_VERSION}" && \
31+
yes | $HOST_CMD dpkg -i /etc/packages-microsoft-prod.deb && $HOST_CMD apt update
32+
33+
# install/update blobfuse
34+
if [ "${INSTALL_BLOBFUSE}" = "true" ]
35+
then
36+
# install blobfuse with latest version or specific version
37+
if [ -z "${BLOBFUSE_VERSION}" ]; then
38+
echo "install blobfuse with latest version"
39+
yes | $HOST_CMD apt-get install -y fuse blobfuse
40+
else
41+
yes | $HOST_CMD apt-get install -y fuse blobfuse="${BLOBFUSE_VERSION}"
42+
fi
43+
fi
44+
45+
# install/update blobfuse2
46+
if [ "${INSTALL_BLOBFUSE2}" = "true" ]
47+
then
48+
# install blobfuse2 with latest version or specific version
49+
if [ -z "${BLOBFUSE2_VERSION}" ]; then
50+
echo "install blobfuse2 with latest version"
51+
yes | $HOST_CMD apt-get install -y fuse3 blobfuse2
52+
else
53+
yes | $HOST_CMD apt-get install -y fuse3 blobfuse2="${BLOBFUSE2_VERSION}"
54+
fi
55+
fi
56+
3557
$HOST_CMD rm -f /etc/packages-microsoft-prod.deb
3658
fi
3759

0 commit comments

Comments
 (0)