@@ -24,15 +24,27 @@ READ_AHEAD_KB=${READ_AHEAD_KB:-15380}
24
24
25
25
HOST_CMD=" nsenter --mount=/proc/1/ns/mnt"
26
26
27
- if [ " ${INSTALL_BLOBFUSE} " = " true" ] || [ " ${INSTALL_BLOBFUSE2} " = " true" ]
27
+ DISTRIBUTION=$( $HOST_CMD cat /etc/os-release | grep ^ID= | cut -d' =' -f2 | tr -d ' "' )
28
+ echo " Linux distribution: $DISTRIBUTION "
29
+
30
+ if [ " ${DISTRIBUTION} " = " ubuntu" ] && { [ " ${INSTALL_BLOBFUSE} " = " true" ] || [ " ${INSTALL_BLOBFUSE2} " = " true" ]; }
28
31
then
29
- cp /blobfuse-proxy/packages-microsoft-prod.deb /host/etc/
32
+ release=$( $HOST_CMD lsb_release -rs)
33
+ echo " Ubuntu release: $release "
34
+
35
+ if [ " $( expr " $release " \< " 22.04" ) " -eq 1 ]
36
+ then
37
+ cp /blobfuse-proxy/packages-microsoft-prod-18.04.deb /host/etc/packages-microsoft-prod.deb
38
+ else
39
+ cp /blobfuse-proxy/packages-microsoft-prod-22.04.deb /host/etc/packages-microsoft-prod.deb
40
+ fi
41
+
30
42
# when running dpkg -i /etc/packages-microsoft-prod.deb, need to enter y to continue.
31
43
# refer to https://stackoverflow.com/questions/45349571/how-to-install-deb-with-dpkg-non-interactively
32
44
yes | $HOST_CMD dpkg -i /etc/packages-microsoft-prod.deb && $HOST_CMD apt update
33
45
34
46
pkg_list=" "
35
- if [ " ${INSTALL_BLOBFUSE} " = " true" ]
47
+ if [ " ${INSTALL_BLOBFUSE} " = " true" ] && [ " $( expr " $release " \< " 22.04 " ) " -eq 1 ]
36
48
then
37
49
pkg_list=" ${pkg_list} fuse"
38
50
# install blobfuse with latest version or specific version
46
58
47
59
if [ " ${INSTALL_BLOBFUSE2} " = " true" ]
48
60
then
49
- release=$( $HOST_CMD lsb_release -rs)
50
- if [ " $release " = " 18.04" ]; then
61
+ if [ " $( expr " $release " \< " 22.04" ) " -eq 1 ]; then
51
62
echo " install fuse for blobfuse2"
52
63
pkg_list=" ${pkg_list} fuse"
53
64
else
0 commit comments