From 5bb66bbe18e98428e448cf5063b297c56818141a Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Mon, 15 Apr 2013 21:16:03 +0200 Subject: [PATCH] aiccu: Rename variables for credentials to username and password. I've rename this two variables because we want them named equal for all network hooks. --- functions.aiccu | 20 ++++++++++---------- helpers/aiccu-config-helper | 4 ++-- hooks/zones/aiccu | 20 ++++++++++---------- man/network-zone-aiccu.xml | 4 ++-- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/functions.aiccu b/functions.aiccu index 01213bee..a201ee19 100644 --- a/functions.aiccu +++ b/functions.aiccu @@ -53,8 +53,8 @@ function aiccu_write_config() { assert isset device assert isset file - local user - local secret + local username + local password local server local protocol="tic" local tunnel_id @@ -62,11 +62,11 @@ function aiccu_write_config() { while [ $# -gt 0 ]; do case "${1}" in - --user=*) - user="$(cli_get_val ${1})" + --username=*) + username="$(cli_get_val ${1})" ;; - --secret=*) - secret="$(cli_get_val ${1})" + --password=*) + password="$(cli_get_val ${1})" ;; --server=*) server="$(cli_get_val ${1})" @@ -90,8 +90,8 @@ function aiccu_write_config() { shift done - assert isset user - assert isset secret + assert isset username + assert isset password assert isset server assert isset protocol assert isset require_tls @@ -113,8 +113,8 @@ function aiccu_write_config() { fi print "# Credentials" - print "username ${user}" - print "password ${secret}" + print "username ${username}" + print "password ${password}" print print "ipv6_interface ${device}" diff --git a/helpers/aiccu-config-helper b/helpers/aiccu-config-helper index 53800221..a01e7cd3 100755 --- a/helpers/aiccu-config-helper +++ b/helpers/aiccu-config-helper @@ -41,8 +41,8 @@ case "${action}" in aiccu_write_config ${zone} ${config_file} \ --server="${SERVER}" \ --protocol="${PROTOCOL}" \ - --user="${USER}" \ - --secret="${SECRET}" \ + --username="${USERNAME}" \ + --password="${PASSWORD}" \ --tunnel-id="${TUNNEL_ID}" \ --require-tls="${REQUIRE_TLS}" ;; diff --git a/hooks/zones/aiccu b/hooks/zones/aiccu index 05433b05..a40a17b8 100755 --- a/hooks/zones/aiccu +++ b/hooks/zones/aiccu @@ -21,18 +21,18 @@ . /usr/lib/network/header-zone -HOOK_SETTINGS="HOOK PROTOCOL REQUIRE_TLS USER SECRET SERVER TUNNEL_ID" +HOOK_SETTINGS="HOOK PASSWORD PROTOCOL REQUIRE_TLS USERNAME SERVER TUNNEL_ID" -USER= -SECRET= +USERNAME= +PASSWORD= SERVER="tic.sixxs.net" PROTOCOL="tic" TUNNEL_ID= REQUIRE_TLS="true" function _check() { - assert isset USER - assert isset SECRET + assert isset USERNAME + assert isset PASSWORD assert isset SERVER assert isset PROTOCOL assert isset REQUIRE_TLS @@ -43,11 +43,11 @@ function _parse_cmdline() { while [ $# -gt 0 ]; do case "$1" in - --user=*) - USER="$(cli_get_val ${1})" + --username=*) + USERNAME="$(cli_get_val ${1})" ;; - --secret=*) - SECRET="$(cli_get_val ${1})" + --password=*) + PASSWORD="$(cli_get_val ${1})" ;; --server=*) SERVER="$(cli_get_val ${1})" @@ -105,7 +105,7 @@ function _status() { zone_config_read ${zone} cli_headline 2 "Configuration" - cli_print_fmt1 2 "User" "${USER}" + cli_print_fmt1 2 "User" "${USERNAME}" cli_print_fmt1 2 "Secret" "" cli_space cli_print_fmt1 2 "Server" "${SERVER}" diff --git a/man/network-zone-aiccu.xml b/man/network-zone-aiccu.xml index 313ce48d..c046c0cb 100644 --- a/man/network-zone-aiccu.xml +++ b/man/network-zone-aiccu.xml @@ -56,7 +56,7 @@ - + @@ -68,7 +68,7 @@ - + -- 2.47.2