forked from evolix/evocheck
Merge branch 'no-check-valid-until'
This commit is contained in:
commit
c0ef3027dd
14
evocheck.sh
14
evocheck.sh
|
@ -1135,12 +1135,23 @@ check_jessie_backports() {
|
|||
jessieBackports=$(grep -hs "jessie-backports" /etc/apt/sources.list /etc/apt/sources.list.d/*)
|
||||
if test -n "$jessieBackports"; then
|
||||
if ! grep -q "archive.debian.org" <<< "$jessieBackports"; then
|
||||
failed "IS_JESSIE_BACKPORTS" "You must use deb http://archive.debian.org/debian/ jessie-backports main"
|
||||
fi
|
||||
failed "IS_JESSIE_BACKPORTS" "You must use deb http://archive.debian.org/debian/ jessie-backports main"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
check_apt_valid_until() {
|
||||
aptvalidFile="/etc/apt/apt.conf.d/99no-check-valid-until"
|
||||
aptvalidText="Acquire::Check-Valid-Until no;"
|
||||
if grep -qs "archive.debian.org" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
|
||||
if ! grep -qs "$aptvalidText" /etc/apt/apt.conf.d/*; then
|
||||
failed "IS_APT_VALID_UNTIL" \
|
||||
fi
|
||||
"As you use archive.mirror.org you need ${aptvalidFile}: ${aptvalidText}"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
# Default return code : 0 = no error
|
||||
RC=0
|
||||
|
@ -1263,6 +1274,7 @@ main() {
|
|||
test "${IS_EVOBACKUP_INCS:=1}" = 1 && check_evobackup_incs
|
||||
test "${IS_OSPROBER:=1}" = 1 && check_osprober
|
||||
test "${IS_JESSIE_BACKPORTS:=1}" = 1 && check_jessie_backports
|
||||
test "${IS_APT_VALID_UNTIL:=1}" = 1 && check_apt_valid_until
|
||||
fi
|
||||
|
||||
#-----------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue