IT3110 @ utahtech
You should modify your script from last week to incorporate the following functions:
usage
: Must work as explained in the previous assignment. The it must display the following string ./assignment.sh url startip user <remove>
. Then it will exit with a status of 1 (one).get_file
: Must download the file described in the previous assignment and store it to /tmp/{filename}
with the non-essential lines removed. It will receive 2 argument: url and filenamegenerate_dhcp_entry
: Receives 5 arguments, firstname, lastname, mac, currentip, and filename. It will generate the appropriate dhcp entry and write it to the filename as explained in the previous assignment.myssh
: Receives 2 arguments: the command to run over ssh, and the user to ssh as. It will run the appropriate ssh command and echo the result.main
: Will check the command-line arguments and call usage if the correct number is not set. Loop through the items in the file and call the appropriate functions to do the work.This assignment does not need to scp anything anywhere.
This assignment does have an autograder. Submit to the week6
directory on github.