1616
1717set -xe
1818
19+ INSTALL_BLOBFUSE_PROXY=${INSTALL_BLOBFUSE_PROXY:- true}
1920INSTALL_BLOBFUSE=${INSTALL_BLOBFUSE:- true}
2021DISABLE_UPDATEDB=${DISABLE_UPDATEDB:- true}
2122SET_MAX_OPEN_FILE_NUM=${SET_MAX_OPEN_FILE_NUM:- true}
2223
2324HOST_CMD=" nsenter --mount=/proc/1/ns/mnt"
2425
25- cp /blobfuse-proxy/packages-microsoft-prod.deb /host/etc/
26-
2726# install/update blobfuse
2827if [ " ${INSTALL_BLOBFUSE} " = " true" ]
2928then
29+ cp /blobfuse-proxy/packages-microsoft-prod.deb /host/etc/
3030 $HOST_CMD dpkg -i /etc/packages-microsoft-prod.deb && \
3131 $HOST_CMD apt update && \
32- $HOST_CMD apt-get install -y blobfuse=" ${BLOBFUSE_VERSION} "
32+ $HOST_CMD apt-get install -y blobfuse=" ${BLOBFUSE_VERSION} " && \
33+ $HOST_CMD rm -f /etc/packages-microsoft-prod.deb
3334fi
3435
3536if [ ! -f " /host/usr/bin/blobfuse-proxy" ]; then
@@ -44,11 +45,14 @@ if [ ! -f "/host/usr/lib/systemd/system/blobfuse-proxy.service" ];then
4445 cp /blobfuse-proxy/blobfuse-proxy.service /host/usr/lib/systemd/system/blobfuse-proxy.service
4546fi
4647
47- $HOST_CMD systemctl daemon-reload
48- $HOST_CMD systemctl enable blobfuse-proxy.service
49- # According to the issue https://github.com/kubernetes-sigs/blob-csi-driver/issues/693,
50- # do NOT RESTART blobfuse-proxy, just start it at first time.
51- $HOST_CMD systemctl start blobfuse-proxy.service
48+ if [ " ${INSTALL_BLOBFUSE_PROXY} " = " true" ]
49+ then
50+ $HOST_CMD systemctl daemon-reload
51+ $HOST_CMD systemctl enable blobfuse-proxy.service
52+ # According to the issue https://github.com/kubernetes-sigs/blob-csi-driver/issues/693,
53+ # do NOT RESTART blobfuse-proxy, just start it at first time.
54+ $HOST_CMD systemctl start blobfuse-proxy.service
55+ fi
5256
5357if [ " ${SET_MAX_OPEN_FILE_NUM} " = " true" ]
5458then
0 commit comments