[j-nsp] Juniper vmx not able to find op and event script files

Martin T m4rtntns at gmail.com
Fri May 20 02:19:47 EDT 2016


Hi,

unfortunately this doesn't work either:

root at vMX-A> file list detail /var/db/scripts/op/abc.slax
-rw-r--r--  1 root  wheel        286 May 20 06:08 /var/db/scripts/op/abc.slax
total files: 1

root at vMX-A> show configuration system scripts op
file abc.slax {
    command cba;
}

root at vMX-A> op cba
error: invalid filename: /var/db/scripts/op/abc.slax

root at vMX-A>


Any other ideas?


thanks,
Martin

On Fri, May 20, 2016 at 9:06 AM, Alexander Marhold
<alexander.marhold at gmx.at> wrote:
> Hi !
>
> Maybe it is not a good idea to name a file equal to a possible command.
>
> Ever tried renaming the file to abc ?
> Second possibility is that in the config you define something like:
>
>  set system scripts op file policy-test.slax command tpol
>
> and then call it with op tpol ...
>
>
> regards
>
> alexander
>
> -----Ursprüngliche Nachricht-----
> Von: juniper-nsp [mailto:juniper-nsp-bounces at puck.nether.net] Im Auftrag von
> Martin T
> Gesendet: Donnerstag, 19. Mai 2016 23:38
> An: serge vautour
> Cc: juniper-nsp
> Betreff: Re: [j-nsp] Juniper vmx not able to find op and event script files
>
> Hi,
>
> thanks for reply! Actually I tried that already, but SLAX script file was
> still not found:
>
> root at vMX-A> op ?
> Possible completions:
>   <script>             Name of script to run
>   test
>   invoke-debugger      Invoke script in debugger mode
>   url                  Execution of remote op script
> root at vMX-A> op test
> error: invalid filename: /var/db/scripts/op/test.slax
>
> root at vMX-A>
>
>
> thanks,
> Martin
>
> On Thu, May 19, 2016 at 6:36 PM, serge vautour <sergervautour at gmail.com>
> wrote:
>> Run your op script without the .slax:
>>
>> op test detail
>>
>> You can also do "op ?" to see a list of available op scripts.
>>
>> Serge
>>
>> On Thu, May 19, 2016 at 11:33 AM, Martin T <m4rtntns at gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> I have a Juniper vmx router running Junos 14.1R1.10. For some reason
>>> it does not find op and event scripts. For example:
>>>
>>> root at vMX-A> file list detail /var/db/scripts/op/
>>>
>>> /var/db/scripts/op/:
>>> total blocks: 12
>>> -rw-r--r--  1 root  wheel        286 May 19 13:37 test.slax
>>> total files: 1
>>>
>>> root at vMX-A> show configuration system scripts op {
>>>     file test.slax;
>>> }
>>>
>>> root at vMX-A> op test.slax detail
>>> error: invalid filename: /var/db/scripts/op/test.slax
>>>
>>> root at vMX-A>
>>>
>>>
>>> ..or in case of an event script:
>>>
>>> [edit]
>>> root at vMX-A# run file list detail /var/db/scripts/event/
>>>
>>> /var/db/scripts/event/:
>>> total blocks: 12
>>> -rw-r--r--  1 root  wheel        286 May 19 13:25 test.slax
>>> total files: 1
>>>
>>> [edit]
>>> root at vMX-A# run file show /var/db/scripts/event/test.slax version
>>> 1.0;
>>>
>>> ns junos = "http://xml.juniper.net/junos/*/junos";
>>> ns xnm = "http://xml.juniper.net/xnm/1.1/xnm";
>>> ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0";
>>>
>>> import "../import/junos.xsl";
>>>
>>> match / {
>>>    <event-script-results> {
>>>    }
>>> }
>>>
>>> [edit]
>>> root at vMX-A# show | compare
>>> [edit]
>>> +  event-options {
>>> +      event-script {
>>> +          file test.slax;
>>> +      }
>>> +  }
>>>
>>> [edit]
>>> root at vMX-A# commit check
>>> error: invalid filename: /var/db/scripts/event//test.slax
>>> error: Reading the configuration from event scripts failed
>>> error: configuration check-out failed
>>>
>>> [edit]
>>> root at vMX-A#
>>>
>>>
>>> I also tried to load scripts from flash("load-scripts-from-flash")
>>> and stored the scripts in respective directory under /config, but
>>> this didn't help.
>>>
>>>
>>> Am I doing something wrong?
>>>
>>>
>>> thanks,
>>> Martin
>>> _______________________________________________
>>> juniper-nsp mailing list juniper-nsp at puck.nether.net
>>> https://puck.nether.net/mailman/listinfo/juniper-nsp
>>
>>
> _______________________________________________
> juniper-nsp mailing list juniper-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/juniper-nsp
>


More information about the juniper-nsp mailing list