]> git.ipfire.org Git - network.git/commitdiff
aiccu: Rename variables for credentials to username and password.
authorStefan Schantl <stefan.schantl@ipfire.org>
Mon, 15 Apr 2013 19:16:03 +0000 (21:16 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Mon, 15 Apr 2013 19:16:03 +0000 (21:16 +0200)
I've rename this two variables because we want them named equal for all network hooks.

functions.aiccu
helpers/aiccu-config-helper
hooks/zones/aiccu
man/network-zone-aiccu.xml

index 01213bee2a2048f7e1c8c9ce1d1949c89649a78b..a201ee19ca0d7009bb21f2fb8da33b99b012c32a 100644 (file)
@@ -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}"
index 53800221d969913cb1d9ddcf65e53356dcb1a55c..a01e7cd3d279e8a5b42aad95309754507d60f846 100755 (executable)
@@ -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}"
                ;;
index 05433b057754e789bedbe2d3bd514626966003f6..a40a17b8140a054e2bbb2c8fcfe93c97571afbff 100755 (executable)
 
 . /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" "<hidden>"
        cli_space
        cli_print_fmt1 2 "Server" "${SERVER}"
index 313ce48d781265a8230674047674d2ab77f4d110..c046c0cb252ed117aed8a2a82981449d9e6e9fa3 100644 (file)
@@ -56,7 +56,7 @@
                <variablelist>
                        <varlistentry>
                                <term>
-                                       <option>--user=<replaceable>USERNAME</replaceable></option>
+                                       <option>--username=<replaceable>USERNAME</replaceable></option>
                                </term>
 
                                <listitem>
@@ -68,7 +68,7 @@
 
                        <varlistentry>
                                <term>
-                                       <option>--secret=<replaceable>PASSWORD</replaceable></option>
+                                       <option>--password=<replaceable>PASSWORD</replaceable></option>
                                </term>
 
                                <listitem>