File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 1717set -xe
1818
1919# in coreos, we could just copy the blobfuse2 binary to /usr/local/bin/blobfuse2
20+ updateBlobfuse2=" true"
2021if [ " ${INSTALL_BLOBFUSE} " = " true" ] || [ " ${INSTALL_BLOBFUSE2} " = " true" ]
2122then
23+ if [ -f " /host/usr/local/bin/blobfuse2" ]; then
24+ old=$( sha256sum /host/usr/local/bin/blobfuse2 | awk ' {print $1}' )
25+ new=$( sha256sum /usr/bin/blobfuse2 | awk ' {print $1}' )
26+ if [ " $old " = " $new " ]; then
27+ updateBlobfuse2=" false"
28+ echo " no need to update blobfuse2 since no change"
29+ fi
30+ fi
31+ else
32+ echo " no need to install blobfuse2"
33+ updateBlobfuse2=" false"
34+ fi
35+ if [ " $updateBlobfuse2 " = " true" ]; then
2236 echo " copy blobfuse2...."
23- cp /usr/bin/blobfuse2 /host/usr/local/bin/blobfuse2
37+ cp /usr/bin/blobfuse2 /host/usr/local/bin/blobfuse2 --force
38+ chmod 755 /host/usr/local/bin/blobfuse2
2439fi
2540
2641# install blobfuse-proxy
3651if [ " $updateBlobfuseProxy " = " true" ]; then
3752 echo " copy blobfuse-proxy...."
3853 rm -rf /host/var/lib/kubelet/plugins/blob.csi.azure.com/blobfuse-proxy.sock
39- rm -rf /host/usr/local/bin/blobfuse-proxy
40- cp /blobfuse-proxy/blobfuse-proxy /host/usr/local/bin/blobfuse-proxy
54+ cp /blobfuse-proxy/blobfuse-proxy /host/usr/local/bin/blobfuse-proxy --force
4155 chmod 755 /host/usr/local/bin/blobfuse-proxy
4256fi
4357
Original file line number Diff line number Diff line change 9090if [ " $updateBlobfuseProxy " = " true" ]; then
9191 echo " copy blobfuse-proxy...."
9292 rm -rf /host/var/lib/kubelet/plugins/blob.csi.azure.com/blobfuse-proxy.sock
93- rm -rf /host/usr/bin/blobfuse-proxy
94- cp /blobfuse-proxy/blobfuse-proxy /host/usr/bin/blobfuse-proxy
93+ cp /blobfuse-proxy/blobfuse-proxy /host/usr/bin/blobfuse-proxy --force
9594 chmod 755 /host/usr/bin/blobfuse-proxy
9695fi
9796
You can’t perform that action at this time.
0 commit comments