Skip to content

Commit c986b15

Browse files
cvvzk8s-infra-cherrypick-robot
authored andcommitted
fix shellcheck
1 parent 4c400bf commit c986b15

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/blobfuse-proxy/init.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ HOST_CMD="nsenter --mount=/proc/1/ns/mnt"
2727
DISTRIBUTION=$($HOST_CMD cat /etc/os-release | grep ^ID= | cut -d'=' -f2 | tr -d '"')
2828
echo "Linux distribution: $DISTRIBUTION"
2929

30-
if [ "${DISTRIBUTION}" = "ubuntu" ] && ([ "${INSTALL_BLOBFUSE}" = "true" ] || [ "${INSTALL_BLOBFUSE2}" = "true" ])
30+
if [ "${DISTRIBUTION}" = "ubuntu" ] && { [ "${INSTALL_BLOBFUSE}" = "true" ] || [ "${INSTALL_BLOBFUSE2}" = "true" ]; }
3131
then
3232
release=$($HOST_CMD lsb_release -rs)
3333
echo "Ubuntu release: $release"
3434

35-
if [ $(expr "$release" \< "22.04") -eq 1 ]
35+
if [ "$(expr "$release" \< "22.04")" -eq 1 ]
3636
then
3737
cp /blobfuse-proxy/packages-microsoft-prod-18.04.deb /host/etc/packages-microsoft-prod.deb
3838
else
@@ -44,7 +44,7 @@ then
4444
yes | $HOST_CMD dpkg -i /etc/packages-microsoft-prod.deb && $HOST_CMD apt update
4545

4646
pkg_list=""
47-
if [ "${INSTALL_BLOBFUSE}" = "true" ] && [ $(expr "$release" \< "22.04") -eq 1 ]
47+
if [ "${INSTALL_BLOBFUSE}" = "true" ] && [ "$(expr "$release" \< "22.04")" -eq 1 ]
4848
then
4949
pkg_list="${pkg_list} fuse"
5050
# install blobfuse with latest version or specific version
@@ -58,7 +58,7 @@ then
5858

5959
if [ "${INSTALL_BLOBFUSE2}" = "true" ]
6060
then
61-
if [ $(expr "$release" \< "22.04") -eq 1 ]; then
61+
if [ "$(expr "$release" \< "22.04")" -eq 1 ]; then
6262
echo "install fuse for blobfuse2"
6363
pkg_list="${pkg_list} fuse"
6464
else
@@ -75,7 +75,7 @@ then
7575
fi
7676
fi
7777
echo "begin to install ${pkg_list}"
78-
$HOST_CMD apt-get install -y $pkg_list
78+
$HOST_CMD apt-get install -y "$pkg_list"
7979
$HOST_CMD rm -f /etc/packages-microsoft-prod.deb
8080
fi
8181

0 commit comments

Comments
 (0)