Junos Automation (Scripting)
Junos Automation (Scripting)

junos.xsl location changed

‎10-22-2012 06:30 AM

It looks like the location of junos.xsl changed in recent builds. We ran into it on JunOS 12.1.

 

This means the "../import/junos.xsl" path no longer works in existing scripts. We've solved it by changing the import path to "/usr/libdata/cscript/import/junos.xsl".

 

Is using that absolute path the official, recommended way of adapting scripts to newer JunOS versions?

 

2 REPLIES 2
Junos Automation (Scripting)
Solution
Accepted by topic author tbehrens
‎08-26-2015 01:27 AM

Re: junos.xsl location changed

‎10-22-2012 08:56 AM

The location of junos.xsl is changing in 12.3, but that should be transparent to scripts due to the import symlink, so ../import/junos.xsl" will continue to work fine.

 

One problem that can happen, though, is that if you run 12.3 on a box and then downgrade you'll lose a working import symlink and will need to recreate it:

 

cd /var/db/scripts

rm import

ln -sf /usr/libdata/cscript/import import

 

Any chance that you had 12.3 on this box before? Perhaps the beta code?

 

I'd advise against using an absolute import path. Especially since you know it'll break in 12.3.

Junos Automation (Scripting)

Re: junos.xsl location changed

‎10-23-2012 07:21 AM

It was 12.1, and the import symlink did not exist. Interesting. Okay, I'll add "create symlink" to my bag of tricks. Thanks for the answer! Smiley Happy