From 69ecb7fc561e640266f2b9900e955169b16c03d5 Mon Sep 17 00:00:00 2001 From: Nicolas ViƩville Date: Aug 23 2017 10:04:06 +0000 Subject: Tests if systemctl is present (RHEL6 concerned) --- diff --git a/akmods b/akmods index d766d77..6b9aa70 100644 --- a/akmods +++ b/akmods @@ -425,7 +425,9 @@ check_kmods() # after udev and systemd-modules-load.service have tried to load modules if [[ "${somesucceeded}" ]] && [ ${this_kernelver} = "$(uname -r)" ]; then find /sys/devices -name modalias -print0 | xargs -0 cat | xargs modprobe -a -b -q - systemctl restart systemd-modules-load.service + if [ -f /usr/bin/systemctl ] ; then + systemctl restart systemd-modules-load.service + fi fi }