With the recent changes in commit 80fff9242, there's no longer an $IP variable we can use. Use the same code as in init_functions.sh to get the potentially customized IP address to use for telnet.
80fff9242