From 70301ed3813d9c67319ddd02fb72fa52b93b4328 Mon Sep 17 00:00:00 2001 From: Phil Massyn Date: Wed, 1 Aug 2018 10:14:09 +0900 Subject: [PATCH] Fixed bug with modprobe Fixed the bug with modprobe not detecting modules not installed. --- test/1.1.1.1.sh | 2 +- test/1.1.1.2.sh | 2 +- test/1.1.1.3.sh | 2 +- test/1.1.1.4.sh | 2 +- test/1.1.1.5.sh | 2 +- test/1.1.1.6.sh | 2 +- test/1.1.1.7.sh | 2 +- test/1.1.1.8.sh | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/1.1.1.1.sh b/test/1.1.1.1.sh index 8811250..d4fded2 100644 --- a/test/1.1.1.1.sh +++ b/test/1.1.1.1.sh @@ -3,5 +3,5 @@ # 1.1.1.1 - Ensure mounting of cramfs filesystems is disabled (Scored) -modprobe -n -v cramfs | grep -E "(install /bin/true|FATAL: Module cramfs not found.)" || exit $? +modprobe -n -v cramfs 2>&1 | grep -E "(install /bin/true|FATAL: Module cramfs not found.)" || exit $? [[ -z "$(lsmod | grep cramfs)" ]] || exit 1 diff --git a/test/1.1.1.2.sh b/test/1.1.1.2.sh index 79645c3..4fa5c17 100644 --- a/test/1.1.1.2.sh +++ b/test/1.1.1.2.sh @@ -3,5 +3,5 @@ # 1.1.1.2 - Ensure mounting of freevxfs filesystems is disabled (Scored) -modprobe -n -v freevxfs | grep -E "(install /bin/true|FATAL: Module freevxfs not found.)" || exit $? +modprobe -n -v freevxfs 2>&1 | grep -E "(install /bin/true|FATAL: Module freevxfs not found.)" || exit $? [[ -z "$(lsmod | grep freevxfs)" ]] || exit 1 diff --git a/test/1.1.1.3.sh b/test/1.1.1.3.sh index 61065b0..b94c7a1 100644 --- a/test/1.1.1.3.sh +++ b/test/1.1.1.3.sh @@ -3,5 +3,5 @@ # 1.1.1.3 - Ensure mounting of jffs2 filesystems is disabled (Scored) -modprobe -n -v jffs2 | grep -E "(install /bin/true|FATAL: Module jffs2 not found.)" || exit $? +modprobe -n -v jffs2 2>&1 | grep -E "(install /bin/true|FATAL: Module jffs2 not found.)" || exit $? [[ -z "$(lsmod | grep jffs2)" ]] || exit 1 diff --git a/test/1.1.1.4.sh b/test/1.1.1.4.sh index 7acabc1..9516f13 100644 --- a/test/1.1.1.4.sh +++ b/test/1.1.1.4.sh @@ -3,5 +3,5 @@ # 1.1.1.4 - Ensure mounting of hfs filesystems is disabled (Scored) -modprobe -n -v hfs | grep -E "(install /bin/true|FATAL: Module hfs not found.)" || exit $? +modprobe -n -v hfs 2>&1 | grep -E "(install /bin/true|FATAL: Module hfs not found.)" || exit $? [[ -z "$(lsmod | grep hfs)" ]] || exit 1 diff --git a/test/1.1.1.5.sh b/test/1.1.1.5.sh index 5a4876a..5f967ee 100644 --- a/test/1.1.1.5.sh +++ b/test/1.1.1.5.sh @@ -3,5 +3,5 @@ # 1.1.1.5 - Ensure mounting of hfsplus filesystems is disabled (Scored) -modprobe -n -v hfsplus | grep -E "(install /bin/true|FATAL: Module hfsplus not found.)" || exit $? +modprobe -n -v hfsplus 2>&1 | grep -E "(install /bin/true|FATAL: Module hfsplus not found.)" || exit $? [[ -z "$(lsmod | grep hfsplus)" ]] || exit 1 diff --git a/test/1.1.1.6.sh b/test/1.1.1.6.sh index 73e41b1..eb09dab 100644 --- a/test/1.1.1.6.sh +++ b/test/1.1.1.6.sh @@ -3,5 +3,5 @@ # 1.1.1.6 - Ensure mounting of squashfs filesystems is disabled (Scored) -modprobe -n -v squashfs | grep -E "(install /bin/true|FATAL: Module squashfs not found.)" || exit $? +modprobe -n -v squashfs 2>&1 | grep -E "(install /bin/true|FATAL: Module squashfs not found.)" || exit $? [[ -z "$(lsmod | grep squashfs)" ]] || exit 1 diff --git a/test/1.1.1.7.sh b/test/1.1.1.7.sh index b222026..6aeb439 100644 --- a/test/1.1.1.7.sh +++ b/test/1.1.1.7.sh @@ -3,5 +3,5 @@ # 1.1.1.7 - Ensure mounting of udf filesystems is disabled (Scored) -modprobe -n -v udf | grep -E "(install /bin/true|FATAL: Module udf not found.)" || exit $? +modprobe -n -v udf 2>&1 | grep -E "(install /bin/true|FATAL: Module udf not found.)" || exit $? [[ -z "$(lsmod | grep udf)" ]] || exit 1 diff --git a/test/1.1.1.8.sh b/test/1.1.1.8.sh index 9d295dc..bf56b57 100644 --- a/test/1.1.1.8.sh +++ b/test/1.1.1.8.sh @@ -3,5 +3,5 @@ # 1.1.1.8 - Ensure mounting of FAT filesystems is disabled (Scored) -modprobe -n -v vfat | grep -E "(install /bin/true|FATAL: Module vfat not found.)" || exit $? +modprobe -n -v vfat 2>&1 | grep -E "(install /bin/true|FATAL: Module vfat not found.)" || exit $? [[ -z "$(lsmod | grep vfat)" ]] || exit 1