<div dir="ltr"><div>Hi Shaun,<br><br></div><div>Managed to get the bash script running, missed the double quote on the script.<br><br><i><b>#! /bin/bash<br>tmsh -q -c "cd /;list recursive"<br></b></i><br></div><div></div>Thank you very much...<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 10, 2015 at 8:29 AM, Annie Lee <span dir="ltr"><<a href="mailto:lsy.annie@gmail.com" target="_blank">lsy.annie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Shaun,<br><br></div>I've wrote a script with the below content to run from the F5, but error out..(hence it wont be successful from rancid)<span class=""><br><br><span>#!/bin/bash<br>
tmsh -q -c cd / ;list recursive</span><br></span><div><br>Thanks<br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 9, 2015 at 7:15 PM, Shaun Krok <span dir="ltr"><<a href="mailto:krok@krok.za.net" target="_blank">krok@krok.za.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 2015-02-08 23:16, Annie Lee wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
Hi Shaun,<br>
<br>
Sorry. im new to this scripting and hope you dont mind me asking more<br>
on the bash thingy.<br>
<br>
1) create a file under root privilege with the below contents : (root<br></span>
for the F5 or the rancid box) ? on the F5<span><br>
<br>
#!/bin/bash<br>
tmsh -q -c cd / ;list recursive<br>
<br>
2) how do i call that via rancid ?<br>
<br></span>
_{TMSH -Q LIST => WRITETERMTMSH},_<br>
</blockquote>
<br>
SNIP from the f5rancid script<br>
<br>
# Main<br>
# bigpipe commands, BIGIP v9 and v10<br>
@bigpipe_commandtable = (<br>
{'bigpipe version' => 'ShowVersion'},<br>
{'bigpipe platform' => 'ShowPlatform'},<br>
{'cat /config/bigip.license' => 'ShowLicense'},<br>
{'bigpipe monitor list all' => 'ShowMonitor'},<br>
{'bigpipe profile list' => 'ShowProfile'},<br>
{'bigpipe base list' => 'ShowBaseRun'},<br>
{'bigpipe db show' => 'ShowDb'},<br>
{'bigpipe route static show' => 'ShowRouteStatic'},<br>
#{'ls --full-time --color=never /config/ssl/ssl.crt' => 'ShowSslCrt'},<br>
#{'ls --full-time --color=never /config/ssl/ssl.key' => 'ShowSslKey'},<br>
{'bigpipe list' => 'WriteTermBIGPIPE'}<br>
);<br>
# tmsh commands, BIGIP v11<br>
@tmsh_commandtable = (<br>
{'tmsh show /sys version' => 'ShowVersion'},<br>
{'tmsh show /sys hardware' => 'ShowHardware'},<br>
{'tmsh show /sys license' => 'ShowLicense'},<br>
#{'cat /config/ZebOS.conf' => 'ShowZebOSconf'},<br>
#{'lsof -i :179' => 'ShowZebOSsockets'},<br>
{'tmsh show /net route static' => 'ShowRouteStatic'},<br>
#{'ls --full-time --color=never /config/ssl/ssl.crt' => 'ShowSslCrt'},<br>
#{'ls --full-time --color=never /config/ssl/ssl.key' => 'ShowSslKey'},<br>
#{'tmsh -q list' => 'WriteTermTMSH'},<span><br>
#{'tmsh -q -c /"cd /;list recursive"/' => 'WriteTermTMSH'},<br></span>
{'./f5part' => 'WriteTermTMSH'},<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
<br>
Yes, my rancid is working good with the common partitions..<br>
<br>
Thanks<br>
<br>
On Sat, Feb 7, 2015 at 5:51 AM, Shaun Krok <<a href="mailto:Shaun.Krok@888holdings.com" target="_blank">Shaun.Krok@888holdings.com</a><br></span>
[20]> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
Thanks John --- this worked<br>
<br>
<br>
<br>
Much appreciated<br>
<br>
<br>
<br>
Shaun<br>
<br>
<br>
<br>
<br>
<br></span>
FROM: John Kougoulos [mailto:<a href="mailto:john.kougoulos@gmail.com" target="_blank">john.kougoulos@gmail.<u></u>com</a> [15]]<br>
SENT: Wednesday, February 04, 2015 12:57 PM<br>
TO: Shaun Krok<br>
<br>
CC: <a href="mailto:rancid-discuss@shrubbery.net" target="_blank">rancid-discuss@shrubbery.net</a> [16]<br>
SUBJECT: Re: [rancid] rancid not working with partitions v11.x tmsh<span><br>
F5 LTM<br>
<br>
<br>
<br>
Hi,<br>
<br>
I had a similar problem with the width of the terminal, so when the<br>
device was out of sync, the prompt was becoming longer and some of<br>
the commands failed to be parsed.<br>
<br>
I had to change in f5rancid the line:<br>
$ENV{TERM} = "vt100";<br>
<br>
to:<br>
$ENV{TERM} = "vt100-w";<br>
<br>
Regards,<br>
John<br>
<br>
<br>
<br>
On Wed, Feb 4, 2015 at 8:33 AM, Shaun Krok<br></span>
<<a href="mailto:Shaun.Krok@888holdings.com" target="_blank">Shaun.Krok@888holdings.com</a> [17]> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
Hi there<br>
<br>
I was hoping someone had come across this issue.<br>
<br>
We are using Rancid to collect diffs from our BIG-IP clusters<br>
(as per bash script below)<br>
It works really well but are now facing an issue for reason<br>
unknown that when the cluster is not synced the rancid fails and<br>
reports fetcher issues.<br>
If I run the bash script below manually on each device it works<br>
without issue.<br>
As soon the cluster is synced it works fine ..<br>
<br>
It appears that TMSH is not allowing the script to work but it<br>
works fine if I run it manually on the BIG-IP<br>
<br>
What could be the problem ?<br>
<br>
Thank you<br>
<br>
Shaun<br>
<br>
-----Original Message-----<br>
From: Rancid-discuss [mailto:<a href="mailto:rancid-discuss-bounces@shrubbery.net" target="_blank">rancid-discuss-<u></u>bounces@shrubbery.net</a><br></span><span>
[1]] On Behalf Of Shaun Krok<br>
Sent: Monday, October 13, 2014 8:13 AM<br></span><span>
To: Mick ORourke<br>
Cc: <a href="mailto:rancid-discuss@shrubbery.net" target="_blank">rancid-discuss@shrubbery.net</a> [2]<br>
Subject: Re: [rancid] rancid not working with partitions v11.x<br>
tmsh F5 LTM<br>
<br>
Thank your for the reply ---<br>
<br>
i have created a bash script on the F5 and it works creating a<br>
test.file with all the config<br>
the file is in /root/f5part<br>
<br>
#!/bin/bash<br>
tmsh -q -c cd / ;list recursive<br>
<br>
how do i call from f5rancid or do i have this all wrong ?<br>
<br>
{tmsh -q list => WriteTermTMSH},<br>
#{tmsh -q -c /"cd /;list recursive"/ => WriteTermTMSH},<br>
<br></span><span>
On 2014-10-13 06:13, Mick ORourke wrote:<br>
> We found easiestquickest way to modify rancid-f5 - post 11.x<br>
version<br>
> checkdetect, call a bash script under /root/bin which runs<br>
"tmsh -q<br>
> -c<br>
> cd / ;list recursive" working around the rancid<br>
limitationerrors that<br>
> resulted when cd / ;list recursive was added to rancid-f5<br>
itself.<br>
><br></span>
> On 12 October 2014 15:27, Shaun Krok <<a href="mailto:krok@krok.za.net" target="_blank">krok@krok.za.net</a> [3] [4]><span><br>
wrote:<br>
><br>
>> Hi<br>
>><br>
>> I am busy to integrate Rancid into our network and have an<br>
issue<br>
>> with partitions on BIG IP LTM v11.x<br>
>> All works fine but Rancid does not backup all partitions …<br>
>> I am using the script from GIT with TMSH commands<br>
>><br>
>> This command work from bash : tmsh -q -c "cd /; list<br>
recursive" but<br>
>> does not from the script ..<br>
>><br>
>> This is a snip from the forum where the issue was identified<br>
but is<br>
>> anyone aware if there is a fix :<br>
>><br>
>> Thanks<br>
>><br>
>> Shaun<br>
>><br>
>> here is a working tmsh version in the rancid git repo.<br>
>><br>
>> The only thing that doesnt work when adjusting the script to<br>
list<br>
>> all<br>
>> partition co config is a tmsh -q -c "cd /; list recursive" -<br>
it<br>
>> errors out<br>
>> due to extra double quotes required by the -c option.<br>
>> On Dec 6, 2012 8:57 PM, "Darius Seroka" <dariusjs at <a href="http://gmail.com" target="_blank">gmail.com</a><br></span>
[4] [1]><span><br>
>> wrote:<br>
>><br>
>> Shaun Krok<br>
>> Network Team<br>
>><br>
>> --<br>
>> Shaun Krok<br>
>> Tel: 050 2424 381<br>
>> ______________________________<u></u>_________________<br>
>> Rancid-discuss mailing list<br></span>
>> <a href="mailto:Rancid-discuss@shrubbery.net" target="_blank">Rancid-discuss@shrubbery.net</a> [5] [2]<br>
>> <a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/<u></u>mailman/listinfo/rancid-<u></u>discuss</a> [6]<br>
[3]<br>
><br>
><br>
><br>
> Links:<br>
> ------<br>
> [1] <a href="http://gmail.com" target="_blank">http://gmail.com</a> [7]<br>
> [2] mailto:<a href="mailto:Rancid-discuss@shrubbery.net" target="_blank">Rancid-discuss@<u></u>shrubbery.net</a> [8]<br>
> [3] <a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/<u></u>mailman/listinfo/rancid-<u></u>discuss</a><br>
[9]<br>
> [4] mailto:<a href="mailto:krok@krok.za.net" target="_blank">krok@krok.za.net</a> [10]<span><br>
<br>
--<br>
Shaun Krok<br>
Tel: 050 2424 381<br>
______________________________<u></u>_________________<br>
Rancid-discuss mailing list<br>
</span><a href="mailto:Rancid-discuss@shrubbery.net" target="_blank">Rancid-discuss@shrubbery.net</a> [11]<br>
<a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/<u></u>mailman/listinfo/rancid-<u></u>discuss</a> [12]<span><br>
<br>
This email message and its attachments are for the sole use of the<br>
intended recipient(s) and may not be shared with any other party.<br>
They may contain confidential information of 888 Holdings plc or<br>
its direct and indirect subsidiaries (together, the “888<br>
Group”) and are to be regarded as confidential information under<br>
any non-disclosure agreement. Any review, use, disclosure or<br>
distribution by persons or entities other than the intended<br>
recipient(s) is prohibited. Nothing in this message is capable of<br>
or intended to create any legally binding obligation. The 888<br>
Group will only ever assume a legally binding obligation where<br>
recorded in a written agreement duly executed by the authorized<br>
signatories of the relevant 888 Group company. The 888 Group<br>
accepts no liability for any personal views expressed in this<br>
message. If you are not the intended recipient, please contact the<br>
sender by return and destroy all copies of the original message<br>
and its attachments. Thank you<br>
<br>
______________________________<u></u>_________________<br>
Rancid-discuss mailing list<br>
</span><a href="mailto:Rancid-discuss@shrubbery.net" target="_blank">Rancid-discuss@shrubbery.net</a> [13]<br>
<a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/<u></u>mailman/listinfo/rancid-<u></u>discuss</a> [14]<br>
</blockquote><span>
<br>
<br>
<br>
This email message and its attachments are for the sole use of the<br>
intended recipient(s) and may not be shared with any other party.<br>
They may contain confidential information of 888 Holdings plc or its<br>
direct and indirect subsidiaries (together, the “888 Group”) and<br>
are to be regarded as confidential information under any<br>
non-disclosure agreement. Any review, use, disclosure or<br>
distribution by persons or entities other than the intended<br>
recipient(s) is prohibited. Nothing in this message is capable of or<br>
intended to create any legally binding obligation. The 888 Group<br>
will only ever assume a legally binding obligation where recorded in<br>
a written agreement duly executed by the authorized signatories of<br>
the relevant 888 Group company. The 888 Group accepts no liability<br>
for any personal views expressed in this message. If you are not the<br>
intended recipient, please contact the sender by return and destroy<br>
all copies of the original message and its attachments. Thank you<br>
______________________________<u></u>_________________<br>
Rancid-discuss mailing list<br>
</span><a href="mailto:Rancid-discuss@shrubbery.net" target="_blank">Rancid-discuss@shrubbery.net</a> [18]<br>
<a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/<u></u>mailman/listinfo/rancid-<u></u>discuss</a> [19]<br>
</blockquote>
<br>
<br>
<br>
Links:<br>
------<br>
[1] mailto:<a href="mailto:rancid-discuss-bounces@shrubbery.net" target="_blank">rancid-discuss-bounces@<u></u>shrubbery.net</a><br>
[2] mailto:<a href="mailto:rancid-discuss@shrubbery.net" target="_blank">rancid-discuss@<u></u>shrubbery.net</a><br>
[3] mailto:<a href="mailto:krok@krok.za.net" target="_blank">krok@krok.za.net</a><br>
[4] <a href="http://gmail.com" target="_blank">http://gmail.com</a><br>
[5] mailto:<a href="mailto:Rancid-discuss@shrubbery.net" target="_blank">Rancid-discuss@<u></u>shrubbery.net</a><br>
[6] <a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/<u></u>mailman/listinfo/rancid-<u></u>discuss</a><br>
[7] <a href="http://gmail.com" target="_blank">http://gmail.com</a><br>
[8] mailto:<a href="mailto:Rancid-discuss@shrubbery.net" target="_blank">Rancid-discuss@<u></u>shrubbery.net</a><br>
[9] <a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/<u></u>mailman/listinfo/rancid-<u></u>discuss</a><br>
[10] mailto:<a href="mailto:krok@krok.za.net" target="_blank">krok@krok.za.net</a><br>
[11] mailto:<a href="mailto:Rancid-discuss@shrubbery.net" target="_blank">Rancid-discuss@<u></u>shrubbery.net</a><br>
[12] <a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/<u></u>mailman/listinfo/rancid-<u></u>discuss</a><br>
[13] mailto:<a href="mailto:Rancid-discuss@shrubbery.net" target="_blank">Rancid-discuss@<u></u>shrubbery.net</a><br>
[14] <a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/<u></u>mailman/listinfo/rancid-<u></u>discuss</a><br>
[15] mailto:<a href="mailto:john.kougoulos@gmail.com" target="_blank">john.kougoulos@gmail.<u></u>com</a><br>
[16] mailto:<a href="mailto:rancid-discuss@shrubbery.net" target="_blank">rancid-discuss@<u></u>shrubbery.net</a><br>
[17] mailto:<a href="mailto:Shaun.Krok@888holdings.com" target="_blank">Shaun.Krok@888holdings.<u></u>com</a><br>
[18] mailto:<a href="mailto:Rancid-discuss@shrubbery.net" target="_blank">Rancid-discuss@<u></u>shrubbery.net</a><br>
[19] <a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/<u></u>mailman/listinfo/rancid-<u></u>discuss</a><br>
[20] mailto:<a href="mailto:Shaun.Krok@888holdings.com" target="_blank">Shaun.Krok@888holdings.<u></u>com</a><br>
</blockquote><div><div>
<br>
-- <br>
Shaun Krok<br>
Tel: 050 2424 381<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>