mbox

config: remove old hashes

Message ID 1499183882-24548-1-git-send-email-jonatan.schlag@ipfire.org
State Superseded
Headers

Message

Jonatan Schlag July 5, 2017, 1:58 a.m. UTC
  With the new id feature the old hashes are not necessary anymore.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
---
 src/hooks/configs/ipv4-static | 3 +--
 src/hooks/configs/ipv6-static | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
  

Comments

Michael Tremer July 5, 2017, 2:05 a.m. UTC | #1
Hi,

could we also drop the ipv6_hash function or is that used somewhere
else, too?

-Michael

On Tue, 2017-07-04 at 17:58 +0200, Jonatan Schlag wrote:
> With the new id feature the old hashes are not necessary anymore.
> 
> Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
> ---
>  src/hooks/configs/ipv4-static | 3 +--
>  src/hooks/configs/ipv6-static | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/src/hooks/configs/ipv4-static b/src/hooks/configs/ipv4-
> static
> index cb00252..c395200 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 2a5e8e2..f43ef7e 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}
>  }
  
Jonatan Schlag July 5, 2017, 4:19 a.m. UTC | #2
Hi,

i thouhgt we could use this function to generate a hid for ipv6-static?

Jonatan

Am Di, 4. Jul, 2017 um 6:05 schrieb Michael Tremer 
<michael.tremer@ipfire.org>:
> Hi,
> 
> could we also drop the ipv6_hash function or is that used somewhere
> else, too?
> 
> -Michael
> 
> On Tue, 2017-07-04 at 17:58 +0200, Jonatan Schlag wrote:
>>  With the new id feature the old hashes are not necessary anymore.
>> 
>>  Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
>>  ---
>>   src/hooks/configs/ipv4-static | 3 +--
>>   src/hooks/configs/ipv6-static | 2 +-
>>   2 files changed, 2 insertions(+), 3 deletions(-)
>> 
>>  diff --git a/src/hooks/configs/ipv4-static b/src/hooks/configs/ipv4-
>>  static
>>  index cb00252..c395200 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 2a5e8e2..f43ef7e 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}
>>   }