File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,11 +66,11 @@ ssh_key_create
6666determine_distro
6767
6868# Install the python interpreters
69- case ${DISTRO_ID } in
70- centos| rhel|rocky )
69+ case ${DISTRO_FAMILY } in
70+ * " rhel" * )
7171 dnf -y install python3 python3-devel python3-libselinux
7272 ;;
73- ubuntu| debian)
73+ * " debian" * )
7474 apt-get update
7575 DEBIAN_FRONTEND=noninteractive apt-get -y install \
7676 python3 python3-dev \
@@ -80,15 +80,15 @@ case ${DISTRO_ID} in
8080esac
8181
8282# Install the base packages
83- case ${DISTRO_ID } in
84- rocky|centos| rhel)
83+ case ${DISTRO_FAMILY } in
84+ * " rhel" * )
8585 dnf -y install \
8686 git-core /usr/bin/curl gcc gcc-c++ nc \
8787 systemd-devel pkgconf \
8888 openssl-devel libffi-devel \
8989 rsync wget
9090 ;;
91- ubuntu| debian)
91+ * " debian" * )
9292 apt-get update
9393 DEBIAN_FRONTEND=noninteractive apt-get -y install \
9494 git-core curl gcc \
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ function determine_distro {
9595 export DISTRO_ID=" ${ID} "
9696 export DISTRO_NAME=" ${NAME} "
9797 export DISTRO_VERSION_ID=${VERSION_ID}
98+ export DISTRO_FAMILY=" ${ID_LIKE:- " " } ${ID} "
9899}
99100
100101function ssh_key_create {
@@ -193,12 +194,12 @@ function gate_job_exit_tasks {
193194function gate_log_requirements {
194195 # ensure packages are installed to get instance info
195196 determine_distro
196- case ${DISTRO_ID } in
197- ubuntu| debian)
197+ case ${DISTRO_FAMILY } in
198+ * " debian" * )
198199 apt-get update
199200 DEBIAN_FRONTEND=noninteractive apt-get -y install iproute2 net-tools parallel
200201 ;;
201- rocky|centos| rhel)
202+ * " rhel" * )
202203 dnf -y install epel-release
203204 sed -i ' s/\[epel\]/&\nincludepkgs=parallel/' /etc/yum.repos.d/epel.repo
204205 dnf -y --enablerepo=epel install iproute parallel
@@ -321,12 +322,12 @@ function get_instance_info {
321322 ip link show > " /openstack/log/instance-info/links_${TS} .log" || true
322323
323324 determine_distro
324- case ${DISTRO_ID } in
325- rocky| rhel)
325+ case ${DISTRO_FAMILY } in
326+ * " rhel" * )
326327 rpm -qa | sort > \
327328 " /openstack/log/instance-info/host_packages_info_${TS} .log" || true
328329 ;;
329- ubuntu| debian)
330+ * " debian" * )
330331 dpkg-query --list > \
331332 " /openstack/log/instance-info/host_packages_info_${TS} .log" || true
332333 ;;
You can’t perform that action at this time.
0 commit comments