From de4d814d7418ad9d6eb3a3fd37e18a67f668b6c5 Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Thu, 16 Sep 2021 17:17:32 +0200 Subject: [PATCH] generate-ldif: detect hardware raid card --- CHANGELOG.md | 1 + generate-ldif/templates/generateldif.sh.j2 | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74f83d18..c952a12d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The **patch** part changes incrementally at each release. * apache: new variable for mpm mode (+ updated default config accordingly) * certbot: add script for manual deploy hooks execution * evolinux-base: install molly-guard by default +* generate-ldid: detect hardware raid card * listupgrade: crontab is configurable * mongodb: create munin plugins directory if missing * mysql: script "mysql_connections" to display a compact list of connections diff --git a/generate-ldif/templates/generateldif.sh.j2 b/generate-ldif/templates/generateldif.sh.j2 index d5c19411..a90a2b03 100755 --- a/generate-ldif/templates/generateldif.sh.j2 +++ b/generate-ldif/templates/generateldif.sh.j2 @@ -174,6 +174,19 @@ NagiosEnabled: TRUE EOT fi +# raid hardware +if [ -n "${raidModel}" ]; then + cat <> "${ldif_file}" + +dn: HardwareName=raid_card,${computer_dn} +objectClass: EvoHardware +HardwareName: raid_card +HardwareType: disk +HardwareModel: ${raidModel} +NagiosEnabled: TRUE +EOT +fi + # Swap swap=$(free -h | grep Swap: | tr -s ' ' | cut -d ' ' -f2) if [ -n "${swap}" ]; then