From 7d3db06f270651eaa5cc63d08060b4261f4cda94 Mon Sep 17 00:00:00 2001 From: GnomeZworc Date: Thu, 15 May 2025 22:10:18 +0200 Subject: [PATCH] fix error in metadata redirect Signed-off-by: GnomeZworc --- agent.sh | 1 + lib/dhcp.sh | 7 ------- lib/metadata.sh | 11 ++++++----- lib/qemu.sh | 2 +- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/agent.sh b/agent.sh index bf18561..f59e09a 100644 --- a/agent.sh +++ b/agent.sh @@ -120,6 +120,7 @@ function main { ;; "Config") metadata_service + systemctl daemon-reload ;; *) echo "action : ${fonction} not known !" diff --git a/lib/dhcp.sh b/lib/dhcp.sh index 3e2abef..008fa7d 100644 --- a/lib/dhcp.sh +++ b/lib/dhcp.sh @@ -33,11 +33,6 @@ function generate_dhcp_file { subnet="$(echo "${cidr}" | cut -d\/ -f1)" output_file="/etc/dnsmasq.d/${2}.conf" - if [ -z "$cidr" ]; then - echo "Veuillez fournir un CIDR en argument, par exemple '10.10.10.0/24'." - exit 1 - fi - # Extraire l'adresse de réseau et le masque IFS='/' read -r network mask <<< "$cidr" network_int=$(ip_to_int "$network") @@ -91,6 +86,4 @@ function generate_dhcp_file { mac_incr=$((mac_incr + 1)) # Incrémenter l'adresse MAC ip_incr=$((ip_incr + 1)) # Incrémenter l'adresse IP done - - echo "Fichier de réservations DHCP généré à $output_file" } \ No newline at end of file diff --git a/lib/metadata.sh b/lib/metadata.sh index d4d793f..e9326a8 100644 --- a/lib/metadata.sh +++ b/lib/metadata.sh @@ -15,6 +15,7 @@ function metadata_config() { VENDOR_DATA=$( cat <