On Fri, Oct 16, 2020 at 02:46:34PM +0800, Zhang Yale wrote:
Provide a login port for user by email, determine whether to send the ssh_port message based on the uuid.
Signed-off-by: Zhang Yale zhangyale3@huawei.com
daemon/sshd | 89 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 69 insertions(+), 20 deletions(-)
diff --git a/daemon/sshd b/daemon/sshd index 98f31d77..55015b40 100755 --- a/daemon/sshd +++ b/daemon/sshd @@ -1,6 +1,16 @@ #!/bin/sh # pub_key # email +# my_uuid +# ssh_port_len +# ssh_port_base
+. $LKP_SRC/lib/http.sh
+sshr_ip=$LKP_SERVER +sshr_port=5050 +[ -n "$sshr_port_len" ] || sshr_port_len=2000 +[ -n "$sshr_port_base" ] || sshr_port_base=30000
run_ssh() { @@ -11,40 +21,79 @@ run_ssh() systemctl start sshd }
-compose_email() +data_success() {
- deadline=$(date -d "+$runtime seconds" +"%Y-%m-%d %H:%M:%S") data="To: $email
-Subject: [NOTIFY compass-ci] $testbox ready to ssh +Subject: [NOTIFY Compass-ci] $testbox ready to use
+Dear $my_name:
Where to define $my_name? And I think my_name is inappropriate, do you mean yourself or someone else.
Thanks, Xijian