Last active
February 22, 2019 12:48
-
-
Save dot1q/cb6e33c7dd2ce7a174ab8c768c8a3b48 to your computer and use it in GitHub Desktop.
Telnet into CMS, Connect to E7(or other device) stack and open the remote timer on an ONT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect | |
set ont [lindex $argv 0] | |
# Arg is the ONT Profile number | |
set timeout 20 | |
spawn telnet 10.10.10.10 9199 | |
#The script expects login | |
expect ">" | |
#The script sends the user variable | |
send "ACT-USER:NTWK-CMSHOSTNAME:USERNAME:::PASSWORD;" | |
expect "CMSHOSTNAME>" | |
send "set ont-port $ont/G1 remote-access-time 30\r" | |
expect "CMSHOSTNAME>" | |
send "show ont $ont detail\r" | |
expect "CMSHOSTNAME>" | |
interactive | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This assumes that the ONT has a RG