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
|
|
@ -36,6 +36,10 @@ machine_id_blank () {
|
|||
[ ! -s /mnt/etc/machine-id ]
|
||||
}
|
||||
|
||||
no_fixed_ntp () {
|
||||
! grep -qE '^[[:space:]]*(pool|server|peer)[[:space:]]' /mnt/etc/chrony.conf
|
||||
}
|
||||
|
||||
check "/var/lib/cloud vide" empty_or_absent /mnt/var/lib/cloud
|
||||
check "aucune clé d'hôte SSH" no_match /mnt/etc/ssh -maxdepth 1 -name 'ssh_host_*'
|
||||
check "aucun authorized_keys sous /root" no_match /mnt/root -name authorized_keys
|
||||
|
|
@ -54,6 +58,8 @@ case "${FAMILY}" in
|
|||
check "DHCP sur toutes les interfaces (NetworkManager)" has_line /mnt/etc/NetworkManager/system-connections/90-all-en.nmconnection "interface-name=en*"
|
||||
check "SELinux désactivé" has_line /mnt/etc/selinux/config "SELINUX=disabled"
|
||||
check "utilisateur par défaut syonad" has_line /mnt/etc/cloud/cloud.cfg.d/20_user.cfg " name: syonad"
|
||||
check "chrony sans serveur NTP fixe" no_fixed_ntp
|
||||
check "chrony sur les serveurs NTP du DHCP" has_line /mnt/etc/chrony.conf "sourcedir /run/chrony-dhcp"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ for unit in rpcbind.service rpcbind.socket; do
|
|||
done
|
||||
|
||||
augtool -r /mnt -s set /files/etc/selinux/config/SELINUX disabled
|
||||
augtool -r /mnt -s rm /files/etc/chrony.conf/pool
|
||||
|
||||
mapfile -t cockpit < <(chroot /mnt rpm -qa 'cockpit*')
|
||||
if [ "${#cockpit[@]}" -gt 0 ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue