Use aptitude before Debian Stretch
This commit is contained in:
parent
f18b54a572
commit
b28910e4bd
|
@ -35,7 +35,12 @@ if [ "$(command -v ceph)" ]; then
|
||||||
|
|
||||||
## Download deb files of all ceph related packages installed on the system
|
## 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."
|
[ "${DEBUG}" -eq "0" ] && printf '%b\n' "Download 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
|
## Use aptitude before Debian Stretch because apt doesn't yet know "download" action
|
||||||
|
if [ "$(cat /etc/debian_version | cut -c1)" -lt "9" ]; then
|
||||||
|
aptitude download -- $(dpkg -l | awk -v pattern="${CEPH_DEB_PKG_PATTERN}" '$0~pattern {print $2"="$3}') || exit 3
|
||||||
|
else
|
||||||
|
apt download -- $(dpkg -l | awk -v pattern="${CEPH_DEB_PKG_PATTERN}" '$0~pattern {print $2"="$3}') || exit 3
|
||||||
|
fi
|
||||||
|
|
||||||
[ "${DEBUG}" -eq "0" ] && printf '%b\n' "Backup Ceph deb files in version : ${CEPH_VERSION}"
|
[ "${DEBUG}" -eq "0" ] && printf '%b\n' "Backup Ceph deb files in version : ${CEPH_VERSION}"
|
||||||
tar cf "${BKP_TAR_PATH}" ./*.deb > /dev/null 2>&1 || exit 4
|
tar cf "${BKP_TAR_PATH}" ./*.deb > /dev/null 2>&1 || exit 4
|
||||||
|
|
Loading…
Reference in New Issue