--- alx-src/branches/alxconf-060/functions/config_ssh_auth.sh 2012/04/16 08:45:02 3484 +++ alx-src/branches/alxconf-060/functions/config_ssh_auth.sh 2012/04/16 08:46:22 3485 @@ -18,8 +18,8 @@ config_ssh_auth() { - local PUB_KEY_SERVER - local ID + local pub_key_server + local id local pubkey local CONFIG @@ -30,22 +30,22 @@ pubkey="$(dropbearkey -y -f /etc/dropbear/dropbear_rsa_host_key | sed -n '2p')" # write the public key of the server to the host system - PUB_KEY_SERVER="$(mysqldo "select public_key from ssh_auth_server where id=1;")" + pub_key_server="$(mysqldo "select public_key from ssh_auth_server where id=1;")" - if [[ ! -z ${PUB_KEY_SERVER} ]] + if [[ ! -z ${pub_key_server} ]] then HOME="/root" # only if not empty [ ! -d $HOME/.ssh ] && install -d $HOME/.ssh CONFIG="$HOME/.ssh/authorized_keys" clearconfig - addconfig "${PUB_KEY_SERVER}" + addconfig "${pub_key_server}" fi # put the public key of the host into the db - ID=$(mysqldo "select serial from ssh_auth_clients where serial=${ALX_SERIAL};") + id=$(mysqldo "select serial from ssh_auth_clients where serial=${ALX_SERIAL};") - if [[ ! -z ${ID} ]] + if [[ ! -z ${id} ]] then # run an update mysqldo "update ssh_auth_clients set public_key='${pubkey}' where serial=${ALX_SERIAL};"