Skip to content

Commit 32420d0

Browse files
authored
Install nbd explicitly (#87)
This pull request includes changes to the installation scripts for CentOS, Fedora, and Debian/Ubuntu systems to ensure the necessary packages are installed. The most important changes include adding the `nbd` package to the CentOS/Fedora installation and the `nbd-client` package to the Debian/Ubuntu installation. Package additions: * [`scripts/install-elastio.sh`](diffhunk://#diff-140ec7e3534c5f069e64278e6e34535630189b72153533b35375b20dd166f5ceR68): Added `yum install -y nbd` to the `cent_fedora_install()` function to ensure the `nbd` package is installed on CentOS and Fedora systems. * [`scripts/install-elastio.sh`](diffhunk://#diff-140ec7e3534c5f069e64278e6e34535630189b72153533b35375b20dd166f5ceL155-R156): Added `apt-get --no-install-recommends install -y elastio ntfs-3g nbd-client` to the `deb_ubu_install()` function to ensure the `nbd-client` package is installed on Debian and Ubuntu systems. Resolves elastio/elastio#9765
1 parent 818cf9d commit 32420d0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

scripts/install-elastio.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ cent_fedora_install()
9393

9494
# Install ntfs-3g to any RPM-based distro except Fedora 35+ with the kernel 5.15+
9595
[ $2 -lt 35 ] && yum install -y ntfs-3g
96+
# Install nbd to any RPM-based distro except Amazon Linux 2 and 2023
97+
[ "$1" != "Amazon" ] && yum install -y nbd
9698
}
9799

98100
check_installed()
@@ -152,7 +154,7 @@ deb_ubu_install()
152154
apt-get -o apt::install-recommends=true install -y elastio-snap-utils
153155
elif [ ! -z "$cli" ]; then
154156
# Install just elastio w/o driver as dependency
155-
apt-get --no-install-recommends install -y elastio ntfs-3g
157+
apt-get --no-install-recommends install -y elastio ntfs-3g nbd-client
156158
fi
157159
}
158160

@@ -329,10 +331,9 @@ case ${dist_name} in
329331

330332
fedora | fc )
331333
case ${dist_ver}-$(uname -m) in
332-
38-* ) cent_fedora_install Fedora $(rpm -E %fedora) fc ;;
333-
39-* ) cent_fedora_install Fedora $(rpm -E %fedora) fc ;;
334-
* )
335-
echo "Only Fedora versions 38 and 39 are supported. Current distro version $dist_ver isn't supported."
334+
39-* | 40-* ) cent_fedora_install Fedora $(rpm -E %fedora) fc ;;
335+
* )
336+
echo "Only Fedora versions 39 and 40 are supported. Current distro version $dist_ver isn't supported."
336337
exit 1
337338
;;
338339
esac

0 commit comments

Comments
 (0)