Skip to content

Commit 5ad9534

Browse files
cvvzk8s-infra-cherrypick-robot
authored andcommitted
fix
1 parent 3465dae commit 5ad9534

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

pkg/blobfuse-proxy/install-proxy-rhcos.sh

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,25 @@
1717
set -xe
1818

1919
# in coreos, we could just copy the blobfuse2 binary to /usr/local/bin/blobfuse2
20+
updateBlobfuse2="true"
2021
if [ "${INSTALL_BLOBFUSE}" = "true" ] || [ "${INSTALL_BLOBFUSE2}" = "true" ]
2122
then
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
2839
fi
2940

3041
# install blobfuse-proxy

0 commit comments

Comments
 (0)