IS_DEBIANSECURITY_LXC: Don’t test older than Debian 9 containers
We use eLTS for Jessie without security, that has been archived and signed with an expired key.
This commit is contained in:
parent
ff5f7ec399
commit
2df62afa21
|
@ -205,8 +205,11 @@ check_debiansecurity_lxc() {
|
||||||
if is_installed lxc; then
|
if is_installed lxc; then
|
||||||
container_list=$(lxc-ls)
|
container_list=$(lxc-ls)
|
||||||
for container in $container_list; do
|
for container in $container_list; do
|
||||||
|
DEBIAN_LXC_VERSION=$(cut -d "." -f 1 < /var/lib/lxc/${container}/rootfs/etc/debian_version)
|
||||||
|
if [ $DEBIAN_LXC_VERSION -ge 9 ]; then
|
||||||
lxc-attach --name $container apt-cache policy | grep "\bl=Debian-Security\b" | grep "\bo=Debian\b" | grep --quiet "\bc=main\b"
|
lxc-attach --name $container apt-cache policy | grep "\bl=Debian-Security\b" | grep "\bo=Debian\b" | grep --quiet "\bc=main\b"
|
||||||
test $? -eq 0 || failed "IS_DEBIANSECURITY_LXC" "missing Debian-Security repository in container ${container}"
|
test $? -eq 0 || failed "IS_DEBIANSECURITY_LXC" "missing Debian-Security repository in container ${container}"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue