In some exported configuration scripts posted on the web, I see lines that contain [ find default= ]
I have looked all over for a definition of what it means to put commands like that inside brackets.
The closest I came to an explanation was this script quote from the “Manual:Configuration_Management” manual page:
/interface ethernet
set [ find default-name=ether5 ] auto-negotiation=no name=ether1-gateway
set [ find default-name=ether6 ] name=ether2
set [ find default-name=ether7 ] name=ether3
set [ find default-name=ether8 ] name=ether4
set [ find default-name=ether1 ] name=ether5
set [ find default-name=ether2 ] name=ether6
set [ find default-name=ether3 ] name=ether7
set [ find default-name=ether4 ] name=ether8
The page suggests that the export script command inserted the bracketed commands as a hint that a default has been violated.
However, it is not clear to me if this situation can be ignored or requires fixing up before importing the script.
Can I simply delete the bracketed command and move on, or is additional action required?
the set command needs a list of items on which properties have to be changed. In particular case value of name property is changed. In usual (interactive) case, either one types in item index number (keeping in mind that index number is not a static thing, it depends on previously executed print command) or set command prompts to enter tge number. Alternative is to use “square bracket” construct which passes zero, one, or many references to items.
The contents of “squate bracket” construct can be various but find command is very handy. Now the find command takes a few options and these are referring to item properties (you can not search items according to non-existant properties). In this particular case find command is searching according to value of property default-name … physical interfaces have this oroperty, logical interfaces don’t. One could as well run something like this:
/interface ethernet
set [ find name="ether2" ] speed=10M
but in this case command would change setting of interface which has that name at time of executing the command.
So basically: the default-* is nothing really special, some items gave such properties, most don’t.