Ceph: Fix the Debian version comparison
This commit is contained in:
parent
ba359c4f75
commit
ea792f4d43
|
@ -34,11 +34,12 @@ if [ "$(command -v ceph)" ]; then
|
|||
cd -- "${CEPH_DEB_PKG_DIR}" > /dev/null || exit 2
|
||||
|
||||
## Download deb files of all ceph related packages installed on the system
|
||||
[ "${DEBUG}" -eq "0" ] && printf '%b\n' "Download deb files of all ceph related packages installed on the system."
|
||||
## Use aptitude before Debian Stretch because apt doesn't yet know "download" action
|
||||
if [ "$(cat /etc/debian_version | cut -c1)" -lt "9" ]; then
|
||||
if [ "$(cat /etc/debian_version | cut -d"." -f1)" -lt "9" ]; then
|
||||
[ "${DEBUG}" -eq "0" ] && printf '%b\n' "Download (with aptitude) deb files of all ceph related packages installed on the system."
|
||||
aptitude download -- $(dpkg -l | awk -v pattern="${CEPH_DEB_PKG_PATTERN}" '$0~pattern {print $2"="$3}') || exit 3
|
||||
else
|
||||
[ "${DEBUG}" -eq "0" ] && printf '%b\n' "Download (with apt) deb files of all ceph related packages installed on the system."
|
||||
apt download -- $(dpkg -l | awk -v pattern="${CEPH_DEB_PKG_PATTERN}" '$0~pattern {print $2"="$3}') || exit 3
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue