two-images: rocky10, chrony sur les seuls serveurs NTP du DHCP #1
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
5662b831bf
commit
a990c5a33e
4 changed files with 17 additions and 1 deletions
9
test.sh
9
test.sh
|
|
@ -132,6 +132,12 @@ cloud_init_done () {
|
|||
vm 'cloud-init status --wait' | grep -q 'status: done'
|
||||
}
|
||||
|
||||
no_ntp_source () {
|
||||
local sources
|
||||
sources=$(vm 'chronyc -n -c sources') || return 1
|
||||
[ -z "${sources}" ]
|
||||
}
|
||||
|
||||
image="${1:-}"
|
||||
if [ -z "${image}" ] || [ ! -f "${DIST}/${image}.qcow2" ]; then
|
||||
die "usage : ${0} <image> (fichier ${DIST}/<image>.qcow2)"
|
||||
|
|
@ -158,6 +164,9 @@ check "aucune clé de construction" vm '! sudo grep -rq two-images-build /home /
|
|||
if vm 'command -v getenforce' >/dev/null; then
|
||||
check "SELinux désactivé" test "$(vm getenforce)" = Disabled
|
||||
fi
|
||||
if vm 'command -v chronyc' >/dev/null; then
|
||||
check "aucune source NTP hors DHCP (QEMU n'en annonce pas)" no_ntp_source
|
||||
fi
|
||||
BOOT=$(boot_id)
|
||||
vm_closing 'sudo systemctl reboot'
|
||||
wait_reboot "${BOOT}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue