File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-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
22- old=$( sha256sum /host/usr/local/bin/blobfuse2 | awk ' {print $1}' )
23- new=$( sha256sum /usr/bin/blobfuse2 | awk ' {print $1}' )
24- if [ " $old " != " $new " ]; then
25- echo " copy blobfuse2...."
26- cp /usr/bin/blobfuse2 /host/usr/local/bin/blobfuse2 --force
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
2730 fi
31+ else
32+ echo " no need to install blobfuse2"
33+ updateBlobfuse2=" false"
34+ fi
35+ if [ " $updateBlobfuse2 " = " true" ]; then
36+ echo " copy blobfuse2...."
37+ cp /usr/bin/blobfuse2 /host/usr/local/bin/blobfuse2 --force
38+ chmod 755 /host/usr/local/bin/blobfuse2
2839fi
2940
3041# install blobfuse-proxy
You can’t perform that action at this time.
0 commit comments