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
|
@ -24,7 +24,7 @@
|
||||||
oml ipa stream-id 255 line 0
|
oml ipa stream-id 255 line 0
|
||||||
neighbor-list mode automatic
|
neighbor-list mode automatic
|
||||||
<% @bts.each_with_index do |b, i| -%>
|
<% @bts.each_with_index do |b, i| -%>
|
||||||
<% if i != index -%>
|
<% if i < index -%>
|
||||||
neighbor bts <%= i %>
|
neighbor bts <%= i %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
|
@ -169,6 +169,28 @@ unlock () {
|
||||||
expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"';
|
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 ()
|
red ()
|
||||||
{
|
{
|
||||||
if [ "$1" == "" ]; then
|
if [ "$1" == "" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue