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?
A.
If the first line of the file ends with a shebang (#!), the file is a configuration file.
B.
If the first line of the file starts with a shebang (#!), the file is a script.
C.
If the last line of the file ends with a shebang (#!), the file is a script.
D.
If the last line of the file starts with a shebang (#!), the file is 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.
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
thangngo
Highly Voted 5 years, 4 months agonetwork_guru
Most Recent 3 years, 9 months ago