OS10 Enterprise Edition User Guide Release 10.4.1.0

PDF

ZTD provisioning script

Create a ZTD script file that you store on an HTTP server. Configure the URL of the script using DHCP option 240 ( ztd-provision-url) on the DHCP server.

  • NOTE: Downloading the ZTD provisioning script is supported only on HTTP connections.
ZTD downloads and executes the script to upgrade the OS10 image, configure the switch, and execute a post-ZTD script to perform additional functions.
  • Write the ZTD provisioning script in bash. Enter #!/bin/bash as the first line in the script. You can use the sample script in this section as a basis.
  • For IMG_FILE, enter the URL path of the OS10 image to download and upgrade the switch. The image is written to the standby partition.
  • For CLI_CONFIG_FILE, enter the URL path of the CLI batch file to download and execute.
  • For POST_SCRIPT_FILE, enter the URL path of the script to execute.
  • ZTD fails and exits to CLI configuration mode if:
    • You do not specify at least one valid URL for the IMG_FILE, CLI_CONFIG_FILE, and POST_SCRIPT_FILE variables.
    • Any of the IMG_FILE, CLI_CONFIG_FILE, and POST_SCRIPT_FILE entries are invalid or if specified, the files cannot be downloaded.
For the IMG_FILE, CLI_CONFIG_FILE, and POST_SCRIPT_FILE files, you can specify HTTP, SCP, SFTP, or TFTP URLs. For example:
scp://userid:passwd@hostip/filepath
                                 sftp://userid:passwd@hostip/filepath
                              

Example

#!/bin/bash
                              
                              ####################################################################
                              #  
                              #
                              #            Example OS10 ZTD Provisioning Script   
                              #
                              #
                              ####################################################################
                              
                              ########## UPDATE THE BELOW CONFIG VARIABLES ACCORDINGLY ###########
                              ########## ATLEAST ONE OF THEM SHOULD BE FILLED ####################
                              
                              IMG_FILE=”http://50.0.0.1/OS10.bin”
                              CLI_CONFIG_FILE="http://50.0.0.1/cli_config"
                              POST_SCRIPT_FILE="http://50.0.0.1/no_post_script.py"
                              
                              
                              ################### DO NOT MODIFY THE LINES BELOW #######################
                              
                              sudo os10_ztd_start.sh "$IMG_FILE" "$CLI_CONFIG_FILE" "$POST_SCRIPT_FILE"
                              
                              ########################      **END**     ###############################
                           

Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\