[Contents] [Prev] [Next] [Index] [Report an Error]


Specifying a Master Source for a Script

You can store a master copy of each commit script in a central repository. This eases file management by allowing you to make changes to the master commit script in one place, then refresh the local copies of the currently enabled commit scripts.

To indicate the location of the master source file of a commit script, include the source statement at the [edit system scripts commit file filename.xsl] hierarchy level:

[edit system scripts commit file filename.xsl]
source url;

Specify the source as a Hypertext Transfer Protocol (HTTP) URL, FTP URL, or secure copy (scp)-style remote file specification. The following example uses an HTTP URL:

system {
    scripts {
        commit {
            file iso.xsl {
                source http://my.example.com/pub/scripts/iso.xsl;
            }
        }
    }
}

For each routing platform, the local source of the commit script remains the /var/db/scripts/commit directory on the routing platform. The source statement allows you to refresh the copy located in the /var/db/scripts/commit directory by overwriting it with the master copy located at the specified URL.

The source statement has no effect until you include the refresh statement in the configuration, as described in Refreshing a Script from the Master Source.


[Contents] [Prev] [Next] [Index] [Report an Error]