ZTP can retrieve either an EOS configuration file or a script at boot. How does the switch determine of the file being retrieved in a script or a configuration file?
ZTP can retrieve either an EOS configuration file or a script at boot. How does the switch determine of the file being retrieved in a script or a configuration file?
If the first line of the file starts with a shebang (#!), the file is a script. A shebang (#!) at the beginning of a file is a convention used in many scripting languages to indicate that the file is a script and specify the interpreter to be used. Therefore, the presence of a shebang indicates the file is a script; otherwise, it is treated as a configuration file.
B is correct The Option 67 file can be a startup-config file or a boot script. The switch distinguishes between a startup-config file and a boot script by examining the first line in the file: • The first line of a boot file must consist of the #! characters followed by the interpreter path. The switch executes the code in the script, then reboots. The boot script may fetch an EOS software image or perform required customization tasks. The following boot file fetches an EOS software image and stores a startup configuration file to flash. #!/usr/bin/Cli -p2 copy http://company.com/startup-config flash:startup-config copy http://company.com/EOS-2.swi flash:EOS-2.swi config boot system flash:EOS-2.swi • The switch identifies any other file as a startup-config file. The switch copies the startup-config file into flash as mnt/flash/startup-config, then reboots.
as Thangngo says a config file does not have !# at the first or last line. This !# is used in script files like shell or python. An interpreter follows this like /usr/bin/...Answer is B.