301_non_use_alsasound

#!/bin/bash
# Output:
# Result must exactly equal to "3:off,5:off", or "NA"
#
# Other output is non-compliant.

ret=`chkconfig --list alsasound 2>/dev/null|awk '{print $5","$7}'`
if [ "$ret" = "" ]; then
	echo "NA"
elif 
	[ "$ret" = "3:off,5:off" ];then
	echo "$ret"
else
	echo "The alsasound configure incorrect,you can alter it like this:
chkconfig alsasound off"
fi

301_non_use_cups

#!/bin/bash
# Output:
# Result must exactly equal to "3:off,5:off", or "NA"
#
# Other output is non-compliant.

ret=`chkconfig --list cups 2>/dev/null|awk '{print $5","$7}'`
if [ "$ret" = "" ]; then
        echo "NA"
elif
        [ "$ret" = "3:off,5:off" ];then
        echo "$ret"
else
        echo "The cups configure incorrect,you can alter it like this:
chkconfig cups off"
fi

301_non_use_iscsitarget

#!/bin/bash
# Output:
# Result must exactly equal to "3:off,5:off", or "NA"
#
# Other output is non-compliant.

ret=`chkconfig --list iscsitarget 2>/dev/null|awk '{print $5","$7}'`
if [ "$ret" = "" ]; then
        echo "NA"
elif
        [ "$ret" = "3:off,5:off" ];then
        echo "$ret"
else
        echo "The iscsitarget configure incorrect,you can alter it like this:
chkconfig iscsitarget off"
fi

301_non_use_ldap

#!/bin/bash
# Output:
# Result must exactly equal to "3:off,5:off", or "NA"
#
# Other output is non-compliant.

ret=`chkconfig --list ldap 2>/dev/null|awk '{print $5","$7}'`
if [ "$ret" = "" ]; then
        echo "NA"
elif
        [ "$ret" = "3:off,5:off" ];then
        echo "$ret"
else
        echo "The ldap configure incorrect,you can alter it like this:
chkconfig ldap off"
fi

301_non_use_pcscd

#!/bin/bash
# Output:
# Result must exactly equal to "3:off,5:off", or "NA"
#
# Other output is non-compliant.

ret=`chkconfig --list pcscd 2>/dev/null|awk '{print $5","$7}'`
if [ "$ret" = "" ]; then
        echo "NA"
elif
        [ "$ret" = "3:off,5:off" ];then
        echo "$ret"
else
        echo "The pcscd configure incorrect,you can alter it like this:
chkconfig pcscd off"
fi

301_non_use_postfix

#!/bin/bash
# Output:
# Result must exactly equal to "3:off,5:off", or "NA"
#
# Other output is non-compliant.

ret=`chkconfig --list postfix 2>/dev/null|awk '{print $5","$7}'`
if [ "$ret" = "" ]; then
        echo "NA"
elif
        [ "$ret" = "3:off,5:off" ];then
        echo "$ret"
else
        echo "The postfix configure incorrect,you can alter it like this:
chkconfig postfix off"
fi

打赏作者

Leave a Reply

Your email address will not be published.