Add shell functions to (un)bar Cells
This commit is contained in:
parent
cd43e41eab
commit
94ba127039
2 changed files with 23 additions and 1 deletions
|
@ -169,6 +169,28 @@ unlock () {
|
|||
expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"';
|
||||
}
|
||||
|
||||
bar ()
|
||||
{
|
||||
if [ "$1" == "" ]; then
|
||||
echo "BTS #?";
|
||||
return;
|
||||
fi;
|
||||
expect -c 'set bts '$1'; spawn telnet localhost 4242; expect ">"; send "enable\r"; expect "#"; send "configure terminal\r"; expect "#";
|
||||
send "network\r"; expect "#"; send "bts $bts\r"; expect "#"; send "cell barred 1\r"; expect "#"; send "exit \r";
|
||||
expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"; send "bts $bts resend-system-information\r"; expect "#"; send "exit\r"; expect "#"'
|
||||
}
|
||||
|
||||
unbar ()
|
||||
{
|
||||
if [ "$1" == "" ]; then
|
||||
echo "BTS #?";
|
||||
return;
|
||||
fi;
|
||||
expect -c 'set bts '$1'; spawn telnet localhost 4242; expect ">"; send "enable\r"; expect "#"; send "configure terminal\r"; expect "#";
|
||||
send "network\r"; expect "#"; send "bts $bts\r"; expect "#"; send "cell barred 0\r"; expect "#"; send "exit \r";
|
||||
expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"; send "bts $bts resend-system-information\r"; expect "#"; send "exit\r"; expect "#"'
|
||||
}
|
||||
|
||||
red ()
|
||||
{
|
||||
if [ "$1" == "" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue