Updating a Commit Script from an Alternate Location

In addition to updating a commit script from the master source defined by the source statement at the [edit system scripts commit file filename] hierarchy level, you also can update a script from an alternate location. This is convenient when, for example, the master source cannot be accessed due to network or other problems. To update a single commit script from the alternate source, issue the set refresh-from command at the [edit system scripts commit file filename] hierarchy level, specifying the location of the remote file:

[edit system scripts commit file filename]user@host# set refresh-from url

To update all commit scripts from the alternate source, issue the set refresh-from command at the [edit system scripts commit] hierarchy level, specifying the location of the remote directory that houses the scripts:

[edit system scripts commit]user@host# set refresh-from url

At both hierarchy levels:

url—URL of the remote commit script or directory. Specify the source as a Hypertext Transfer Protocol (HTTP) URL, FTP URL, or secure copy (scp)-style remote file specification.

When you issue the set refresh-from command, the router or switch attempts to connect to the machine that houses the master source for the script files and retrieve a copy of each file. The master copy overwrites the script stored in the local commit scripts directory. The updated commit script is executed when you next issue the commit command. If no master source for a script is defined, it is not updated and a warning is issued.

If the router has dual Routing Engines and you want to update a script on both Routing Engines, you must issue the set refresh-from command on each Routing Engine separately. The commit synchronize command does not cause the refresh-from statement to update scripts on both Routing Engines.

When you issue the set refresh-from command, JUNOS creates a folder in the /var/tmp directory. This folder is used for file transfer. After the transfer and refresh operations are complete, JUNOS deletes the temporary folder.