Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2020-06-22 11:18:01 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2020-06-22 11:18:01 +0300
commita2f8bdc5f8b4c67338f7cf9995f74df06d572b27 (patch)
tree116fe95bf37c9412a84af71b3a8f12407073f80a /include/tests_boot_services
parent74c4298eab7ce660c896721c064218f66f563c83 (diff)
[BOOT-5122] presence check for grub.d added
Diffstat (limited to 'include/tests_boot_services')
-rw-r--r--include/tests_boot_services8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/tests_boot_services b/include/tests_boot_services
index 8ad83d7c..fe5707e4 100644
--- a/include/tests_boot_services
+++ b/include/tests_boot_services
@@ -332,8 +332,12 @@
if [ ${SKIPTEST} -eq 0 ]; then
FOUND=0
- CONF_FILES=$(${FINDBINARY} /etc/grub.d -type f -name "[0-9][0-9]*" -print0 | ${TRBINARY} '\0' ' ' | ${TRBINARY} -d '[:cntrl:]')
- CONF_FILES="${GRUBCONFFILE} ${ROOTDIR}boot/grub/custom.cfg ${CONF_FILES}"
+ if [ "${ROOTDIR}etc/grub.d" ]; then
+ CONF_FILES=$(${FINDBINARY} "${ROOTDIR}etc/grub.d" -type f -name "[0-9][0-9]*" -print0 | ${TRBINARY} '\0' ' ' | ${TRBINARY} -d '[:cntrl:]')
+ CONF_FILES="${GRUBCONFFILE} ${ROOTDIR}boot/grub/custom.cfg ${CONF_FILES}"
+ else
+ CONF_FILES="${GRUBCONFFILE} ${ROOTDIR}boot/grub/custom.cfg"
+ fi
for FILE in ${CONF_FILES}; do
if [ -f "${FILE}" ]; then