Fix a bug for 9.2.15 and delete the debug method in lib/utils.sh

This commit is contained in:
Samson-W 2019-05-16 14:45:12 +08:00
parent 471a3a0d62
commit c4b9847694
2 changed files with 1 additions and 2 deletions

View File

@ -53,7 +53,7 @@ apply () {
apt_install $PACKAGE
elif [ $FNRET = 2 ]; then
warn "$PATTERN is not present in $FILE"
add_line_file_before_pattern $FILE "password [success=1 default=ignore] pam_unix.so obscure sha512" "# pam-auth-update(8) for details."
add_line_file_before_pattern $FILE "session optional pam_lastlog.so showfailed" "# pam-auth-update(8) for details."
elif [ $FNRET = 3 ]; then
crit "$FILE is not exist, please check"
elif [ $FNRET = 4 ]; then

View File

@ -568,7 +568,6 @@ check_no_param_option_by_pam()
if [ -f "$LOCATION" ];then
RESULT=$(sed -e '/^#/d' -e '/^[ \t][ \t]*#/d' -e 's/#.*$//' -e '/^$/d' $LOCATION | grep "$KEYWORD.*$OPTION" | wc -l)
echo $RESULT
if [ "$RESULT" -eq 1 ]; then
debug "$KEYWORD $OPTION is conf"
FNRET=0