mirror of
https://github.com/hardenedlinux/harbian-audit.git
synced 2025-07-29 00:25:18 +02:00
Fix bug for 10.1.9 and modify apt_update_if_needed function.
This commit is contained in:
parent
73c1e12910
commit
64ab792e6c
@ -36,7 +36,7 @@ audit () {
|
||||
does_pattern_exist_in_file $FILE $PATTERN
|
||||
if [ $FNRET = 0 ]; then
|
||||
ok "$PATTERN is present in $FILE"
|
||||
check_password_by_pam $FILE $PAMLIBNAME $OPTIONNAME ge $CONDT_VAL
|
||||
check_param_pair_by_pam $FILE $PAMLIBNAME $OPTIONNAME ge $CONDT_VAL
|
||||
if [ $FNRET = 0 ]; then
|
||||
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
||||
else
|
||||
|
@ -403,7 +403,7 @@ apt_update_if_needed()
|
||||
then
|
||||
UPDATE_AGE=$(( $(date +%s) - $(stat -c '%Y' /var/cache/apt/pkgcache.bin) ))
|
||||
|
||||
if [ $UPDATE_AGE -gt 21600 ]
|
||||
if [ $UPDATE_AGE -gt 3600 ]
|
||||
then
|
||||
# update too old, refresh database
|
||||
$SUDO_CMD apt-get update -y >/dev/null 2>/dev/null
|
||||
|
Loading…
x
Reference in New Issue
Block a user