From 0f8c794113960c91c592c7f6db0197e9fb3d2ca3 Mon Sep 17 00:00:00 2001 From: Jonatan Schlag Date: Wed, 5 Jul 2017 16:02:36 +0200 Subject: [PATCH] config: remove old hashes With the new id feature the old hashes are not necessary anymore. The ipv6_hash function is dropped because we need this function no more. Signed-off-by: Jonatan Schlag Signed-off-by: Michael Tremer --- src/functions/functions.ipv6 | 8 -------- src/hooks/configs/ipv4-static | 3 +-- src/hooks/configs/ipv6-static | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/functions/functions.ipv6 b/src/functions/functions.ipv6 index 3e81d3a6..e160fb31 100644 --- a/src/functions/functions.ipv6 +++ b/src/functions/functions.ipv6 @@ -446,14 +446,6 @@ ipv6_addr_le() { ipv6_addr_eq $@ || ! ipv6_addr_gt $@ } -ipv6_hash() { - local address="${1}" - assert isset address - - address="$(ipv6_format "${address}")" - echo "${address//:/}" -} - ipv6_get_network() { ip_get_network $@ } diff --git a/src/hooks/configs/ipv4-static b/src/hooks/configs/ipv4-static index cb002526..c3952004 100644 --- a/src/hooks/configs/ipv4-static +++ b/src/hooks/configs/ipv4-static @@ -106,8 +106,7 @@ hook_new() { warning "You did not configure a gateway for a non-local zone" fi - # XXX maybe we can add some hashing to identify a configuration again - zone_config_settings_write "${zone}" "${HOOK}.$(uuid)" + zone_config_settings_write "${zone}" "${HOOK}" exit ${EXIT_OK} } diff --git a/src/hooks/configs/ipv6-static b/src/hooks/configs/ipv6-static index 2a5e8e2c..f43ef7ec 100644 --- a/src/hooks/configs/ipv6-static +++ b/src/hooks/configs/ipv6-static @@ -59,7 +59,7 @@ hook_new() { GATEWAY=$(ipv6_format "${GATEWAY}") fi - zone_config_settings_write "${zone}" "${HOOK}.$(ipv6_hash ${ADDRESS}).${PREFIX}" + zone_config_settings_write "${zone}" "${HOOK}" exit ${EXIT_OK} } -- 2.47.3