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 17
17
set -xe
18
18
19
19
# in coreos, we could just copy the blobfuse2 binary to /usr/local/bin/blobfuse2
20
+ updateBlobfuse2=" true"
20
21
if [ " ${INSTALL_BLOBFUSE} " = " true" ] || [ " ${INSTALL_BLOBFUSE2} " = " true" ]
21
22
then
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
22
36
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
24
39
fi
25
40
26
41
# install blobfuse-proxy
36
51
if [ " $updateBlobfuseProxy " = " true" ]; then
37
52
echo " copy blobfuse-proxy...."
38
53
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
41
55
chmod 755 /host/usr/local/bin/blobfuse-proxy
42
56
fi
43
57
Original file line number Diff line number Diff line change 90
90
if [ " $updateBlobfuseProxy " = " true" ]; then
91
91
echo " copy blobfuse-proxy...."
92
92
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
95
94
chmod 755 /host/usr/bin/blobfuse-proxy
96
95
fi
97
96
You can’t perform that action at this time.
0 commit comments