#!/bin/bash #check the linx security module is loaded export LANG=c echo_fail() { echo -e "\\033[1;31m" "failed" } reset_color() { echo -en "\\033[0;39m" } grep '6.0.3' /etc/issue &>/dev/null if [ $? -eq 0 ];then if [ -d /sys/kernel/security/linx ];then echo "The linx6.0.3 safety function is normal" else echo "The linx6.0.3 safety function abnormal" echo_fail fi else lsmod |grep linx &>/dev/null if [ $? -eq 0 ];then echo "The rocky4.2 or linx6.0.4 security module is loaded." else echo "The rocky4.2 or linx6.0.4 security module isn't loaded." echo_fail fi fi reset_color