Skip to content

Commit 514d51f

Browse files
authored
Merge pull request #33 from stackhpc/feature/elrepo
Add support for elrepo
2 parents 1bac714 + 2289957 commit 514d51f

3 files changed

Lines changed: 33 additions & 0 deletions

File tree

elements/elrepo/README.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
======
2+
ELRepo
3+
======
4+
5+
Enables ELRepo, a community based repository for Enterprise Linux Packages with a focus
6+
on drivers for hardware such as network interface cards.
7+
8+
* ``DIB_ELREPO_PKGLIST`` A list of packages to install from ELRepo.
9+
Default is none.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash -lv
2+
3+
if [[ ${DISTRO_NAME} =~ (centos|rhel) && -n ${DIB_ELREPO_PKGLIST} ]]; then
4+
dnf install -y "${DIB_ELREPO_PKGLIST}"
5+
else
6+
echo "You must set the package list: \"$DIB_ELREPO_PKGLIST\"."
7+
exit 1
8+
fi
9+
10+
exit 0
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash -lv
2+
3+
case "$DISTRO_NAME" in
4+
centos* | rhel*)
5+
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
6+
dnf install -y https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
7+
;;
8+
*)
9+
echo "Distro \"$DISTRO_NAME\" is not supported"
10+
exit 1
11+
;;
12+
esac
13+
14+
exit 0

0 commit comments

Comments
 (0)