If you want to use the examples in this manual, you can use the load merge or the load merge relative command. These commands cause the software to merge the incoming configuration into the current candidate configuration. If the example configuration contains the top level of the hierarchy (or multiple hierarchies), the example is a full example. In this case, use the load merge command.
If the example configuration does not start at the top level of the hierarchy, the example is a snippet. In this case, use the load merge relative command. These procedures are described in the following sections.
To merge a full example, follow these steps:
For example, copy the following configuration to a file and name the file ex-script.conf. Copy the ex-script.conf file to the /var/tmp directory on your routing platform.
-
- system {
-
- scripts {
-
- commit {
- file ex-script.xsl;
- }
- }
- }
-
- interfaces {
-
- fxp0 {
- disable;
-
- unit 0 {
-
- family inet {
- address 10.0.0.1/24;
- }
- }
- }
- }
- [edit]
- user@host# load merge /var/tmp/ex-script.conf
- load complete
To merge a snippet, follow these steps:
For example, copy the following snippet to a file and name the file ex-script-snippet.conf. Copy the ex-script-snippet.conf file to the /var/tmp directory on your routing platform.
-
- commit {
-
- file ex-script-snippet.xsl; }
- [edit]
- user@host# edit system scripts
- [edit system scripts]
- [edit system scripts]
- user@host# load merge relative /var/tmp/ex-script-snippet.conf
- load complete
For more information about the load command, see the JUNOS CLI User Guide.