Add optional flag to enable libvhdi-tools install on RHEL installs

This commit is contained in:
Ben Erickson
2025-01-27 11:44:30 -08:00
parent 66d2f2767d
commit 8e4bbcf8e4
3 changed files with 19 additions and 15 deletions

View File

@@ -244,20 +244,17 @@ function InstallDependenciesRPM {
printok "Installing yarn"
fi
# Disabled for now due to forensics.cert.org going away
# only install libvhdi-tools if vhdimount is not present
# if [[ -z $(runcmd_stdout "command -v vhdimount") ]]; then
# echo
# printprog "Installing libvhdi-tools"
# if [[ "$INSTALL_REPOS" == "true" ]]; then
# runcmd "rpm -ivh https://forensics.cert.org/cert-forensics-tools-release-el${OSVERSION}.rpm"
# runcmd "sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/cert-forensics-tools.repo"
# runcmd "dnf --enablerepo=forensics install -y libvhdi-tools"
# else
# runcmd "dnf install -y libvhdi-tools"
# fi
# printok "Installing libvhdi-tools"
# fi
# Only install libvhdi-tools if vhdimount is not present
if [[ -z $(runcmd_stdout "command -v vhdimount") ]]; then
echo
printprog "Installing libvhdi-tools"
if [[ "$INSTALL_REPOS" == "true" ]] && [[ "$INSTALL_EL_LIBVHDI" == "true" ]]; then
runcmd "dnf copr enable -y bnerickson/libvhdi"
else
runcmd "dnf install -y libvhdi-tools"
fi
printok "Installing libvhdi-tools"
fi
echo
printprog "Enabling and starting redis service"