% CST8207 CentOS alternate Fetch and Check instructions % Ian! D. Allen – – [www.idallen.com] % Winter 2014 - January to April 2014 - Updated Thu Mar 27 09:36:32 EDT 2014 Using the Alternate Fetch and Check =================================== Use these instructions to use the CentOS Fetch and Check programs if the main `.com` web site is down. - The variable `GO` used below is two letters, upper-case. You use it twice, once to get the `do.sh` script and once to execute it. It must be upper-case. It must have the name `GO`. - Pick the correct course, term, and assignment number for the `do.sh` URL, do not use `00` as an assignment number below. 1. Pick either **a** or **b** below (only pick one): a. Get the `do.sh` script from the alternate `.org` site: $ GO=teaching.idallen.org $ url=http://$GO/cst8207/14w/notes/data/assignment00do.sh $ curl -A mozilla "$url" >do.sh $ fgrep -i 'error' do.sh # make sure no errors (no output) $ head -n1 do.sh # make sure it's a shell script #!/bin/sh -u b. Get the `do.sh` script from the alternate `elearning` site: $ GO=elearning.algonquincollege.com/coursemat/alleni/idallen $ url=http://$GO/cst8207/14w/notes/data/assignment00do.sh $ curl -A mozilla "$url" >do.sh $ fgrep -i 'error' do.sh # make sure no errors (no output) $ head -n1 do.sh # make sure it's a shell script #!/bin/sh -u 2. Pick either **a** or **b** below (only pick one) and use `$GO`: a. **Run the script directly as the `root` user:** Use this only if you have not yet created your own sysadmin account: # whoami root # USER=abcd0001 GO=$GO sh do.sh # your userid, not abcd0001 b. **Run the script using `su`:** Use this if you have already created your sysadmin account: $ echo "$USER" abcd0001 # your userid, not abcd0001 $ su -c "USER=$USER GO=$GO sh do.sh" # must be double quotes, not single **READ ALL THE WORDS. OH PLEASE, PLEASE, PLEASE READ ALL THE WORDS!** -- | Ian! D. Allen - idallen@idallen.ca - Ottawa, Ontario, Canada | Home Page: http://idallen.com/ Contact Improv: http://contactimprov.ca/ | College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/ | Defend digital freedom: http://eff.org/ and have fun: http://fools.ca/ [Plain Text] - plain text version of this page in [Pandoc Markdown] format [www.idallen.com]: http://www.idallen.com/ [Plain Text]: 000_centos_alternate.txt [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/