Updated: 2015-04-12 05:22 EDT
The Checking Program that verifies your CentOS work resides on the Course Linux Server, but your work is on your CentOS Virtual Machine. To mark your work, we need to transfer information from your CentOS VM to the CLS for marking.
To do this, there is a Fetch program that you must download and use on your CentOS Virtual Machine to copy information from your CentOS Virtual Machine to your account on the CLS so that the Checking Program can check it on the CLS.
Once the Fetch program has transferred this information from your CentOS Virtual Machine to the CLS, you can run the Checking Program on the CLS to check what is saved there. When you make changes on your CentOS Virtual Machine, you need to run the Fetch program again on CentOS to update the saved files on the CLS.
Simply running the Checking Program on the CLS will not update the saved files on the CLS. You must run the Fetch program on your CentOS VM when you make changes there.
As a convenience, the Fetch program not only transfers information from your CentOS VM to the CLS for marking, it also runs the Checking Program on the CLS for you.
If you have created your personal sysadmin account, choose the first method. If you only have a root
account, choose the second method.
Use this method to download the Fetch program if you have created your personal sysadmin (non-root
) account on CentOS. (This is the preferred method.)
root
account (same userid as Blackboard).CST0001-15W/Assignments/assignmentNN
where CST0001
is your course number and NN
is your assignment number, e.g. assignment99
for Assignment 99. Use the current assignment number, not 99
. This is your CentOS Base Directory for this assignment.curl
to get a copy of the Fetch program from the given URL into a file named do.sh
. In the URL below:
cst0001
with your course number (lower-case)NN
with your assignment number (two digits).do.sh
in your Base Directory.curl
program.Here is an example for course CST0001
and assignment number 99
(you must use your actual course, actual assignment number, and your own userid values):
$ whoami ; hostname ; pwd
abcd0001 # your userid, not abcd0001
abcd0001 # your userid, not abcd0001
/home/abcd0001/CST0001-15W/Assignments/assignment99 # do not use 0001 or 99
$ url=http://teaching.idallen.org/cst0001/15w/notes/data/assignment99do.sh
[... make sure you scroll right to read the full web URL above ...]
$ curl -A mozilla "$url" >do.sh
[... various download statistics print here ...]
Do not use CST0001
, cst0001
, assignment99
, or abcd0001
; use the real values from your own course, assignment, and userid.
Skip forward to “Part II – Verify the Fetch Program”.
root
AccountIndexUse this method to download the Fetch program only if you have not yet created your personal sysadmin account on CentOS. If you have your own sysadmin account, use the previous method instead.
root
account.root
account named for your course, term, and assignment number, e.g. CST0001-15W/Assignments/assignmentNN
where CST0001
is your course number and NN
is your assignment number, e.g. assignment99
for Assignment 99. This is your CentOS Base Directory for this assignment.curl
to get a copy of the Fetch program from the given URL into a file named do.sh
. In the URL below:
cst0001
with your course number (lower-case)NN
with your assignment number (two digits).do.sh
in your Base Directory.curl
program.Here is an example for course CST0001
and assignment number 99
(you must use your actual course, assignment, and userid values):
# whoami ; hostname ; pwd
root
abcd0001 # your userid, not abcd0001
/root/CST0001-15W/Assignments/assignment99 # do not use 0001 or 99
# url=http://teaching.idallen.org/cst0001/15w/notes/data/assignment99do.sh
[... make sure you scroll right to read the full web URL above ...]
# curl -A mozilla "$url" >do.sh
[... various download statistics print here ...]
Do not use CST0001
, cst0001
, assignment99
, or abcd0001
; use the real values from your own course, assignment, and userid.
Make sure you are in the Base Directory for the assignment where you downloaded the do.sh
program for this assignment.
Read (using less do.sh
) and verify that the text file do.sh
is a short shell script that contains a URL for the Fetch program with the current assignment number in it.
If you read things such as Error 404 - page not found
in the do.sh
file then fix your typing mistakes and try again.
Here is an example for course CST0001
and assignment number 99
(you must use your actual course and assignment numbers):
$ curl -A mozilla "$url" >do.sh # $url was set in Part I
[... various download statistics print here ...]
$ file do.sh
do.sh: POSIX shell script text executable # see below if different
$ fgrep 'fetch.sh' do.sh
http://"$GO"/cst0001/15w/notes/data/assignment99fetch.sh
If file
doesn’t say it’s a shell script, or the fgrep
does not find the notes/data
URL for the current course and assignment number in the do.sh
file:
do.sh
file to see if there are any errors that need fixing. The usual cause is typing mistakes in the URL
. Do not use cst0001
or assignment99
; use the real values for your course for the current term and assignment.do.sh
file containing the correct fetch shell script for your course and assignment number.You only need to download this do.sh
Fetch program once per assignment. Every assignment has its own separate do.sh
file to download.
do.sh
Fetch ProgramIndexdo.sh
Fetch program for the current assignment in your CentOS Base Directory to continue with this section.do.sh
script as root
with the USER
environment variable set to your own CLS account userid, as shown below.If you have created your personal sysadmin account and enabled the sudo
command, choose the first method. If you only have a root
account, or if you don’t have sudo
working, choose the second method.
do.sh
using your Sysadmin Account and sudo
IndexUse this method to run the do.sh
Fetch program if you have created your personal sysadmin account and enabled the sudo
command. If you only have a root
account, or if you don’t have sudo
working, choose the second method.
Log in to CentOS as your personal sysadmin account.
Change directories to the Base Directory for the assignment where you downloaded the do.sh
program for this assignment.
As shown below, use sudo
and sh
to run the do.sh
script in the current directory as root
, with the USER
environment variable set to your own CLS account userid:
Example (use your own CLS userid, not abcd0001
):
$ whoami
abcd0001
$ file do.sh
do.sh: POSIX shell script text executable
$ sudo USER=abcd0001 sh do.sh # use your *own* userid *not* abcd0001
abcd0001
.USER=
variable to your correct CLS userid as shown above will cause your account to be locked out of the CLS. (You can also use USER=$USER
to set the USER
variable with sudo
.)do.sh
without using sudo
IndexUse this method to run the do.sh
Fetch program if you have not created your personal sysadmin account or if you have not enabled the sudo
command. If you have your own sysadmin account and a working sudo
, choose the previous method.
Become the root
user: Log in as root
or else use su
to become the root
user.
Change directories to the Base Directory for the assignment where you downloaded the do.sh
program for this assignment.
As shown below, use sh
to run the do.sh
script in the current directory as root
, with the USER
environment variable set to your own CLS account userid:
Example (use your own CLS userid, not abcd0001
):
# whoami
root
# file do.sh
do.sh: POSIX shell script text executable
# USER=abcd0001 sh do.sh # use your *own* userid *not* abcd0001
abcd0001
.USER=
variable to your correct CLS userid as shown above will cause your account to be locked out of the CLS.If you see errors when you run the
do.sh
script, you probably skipped over Part II above. Go back and verify the script. You must have a verified script before you can run it.
When you successfully run the do.sh
script that calls the Fetch program, it will look similar to the text below and you will need to answer two questions:
If you are on-campus, you may answer y
to use the CLS local IP address instead of the public address.
You will need to enter your CLS password to allow the Fetch program to transfer information from CentOS to your account on the CLS for marking.
Here is an example for course CST0001
and assignment number 99
(you must use your actual course, assignment, and userid values):
# USER=abcd0001 sh do.sh
---------------------------------------------------------------------------
abcd0001: FETCH version 3. Connecting to CLS as USER='abcd0001' using ssh
---------------------------------------------------------------------------
abcd0001: Use local Algonquin IP cst0001-alg.idallen.ca [y/N/?]? n
abcd0001: Please wait; using ssh to connect to user 'abcd0001' on cst0001.idallen.ca ...
*** COURSE LINUX SERVER ***
abcd0001@cst0001.idallen.ca's password: # enter your CLS password
---------------------------------------------------------------------------
idallen-ubuntu assignment99fetch_server.sh version 8 run by abcd0001.
Please wait; collecting info from abcd0001 Virtual Machine
---------------------------------------------------------------------------
VM files collected into CST0001-15W/Assignments/assignment99/abcd0001.tar.bz on CLS.
Now running checking program for abcd0001 on CLS:
[... checking program output appears here ...]
This do.sh
script runs a Fetch program that will connect from your CentOS machine to the CLS using your account name set in the USER
variable.
The Fetch program will copy information from your CentOS VM into a root
-owned tar
archive in your assignment Base Directory on the CLS. You can not read the contents of this archive. Do not delete it from the CLS.
The Fetch program will then run the checking program on the CLS to check the contents of the tar
archive on the CLS. You will need to answer one question about your IP address, and then wait and type in your CLS password, as shown above.
The checking program run at the end of the Fetch program is always running on the CLS, not on your CentOS VM.
When the checking program starts, it will issue a few messages relevant to your account on the CLS (e.g. errors in your CLS .bashrc
file or world-writable files on the CLS). These errors are on the CLS, not on your CentOS machine.
You may also log in to the CLS and run the checking program on the CLS, instead of using the Fetch program. If you only run the checking program on the CLS, it won’t update the tar
archive with new information from your CentOS VM; it will just check the existing tar
archive. The checking program will warn you if you are checking an old tar
archive.
Summary: Do some tasks, then run the Fetch and checking program to verify your work as you go. You can run the Fetch and checking program as often as you want. When you have the best mark, upload the marks file to Blackboard.
Since I also do manual marking of student assignments, your final mark may not be the same as the mark submitted using the current version of the Checking Program. I do not guarantee that any version of the Checking Program will find all the errors in your work. Complete your assignments according to the specifications, not according to the incomplete set of the mistakes detected by the Checking Program.
When you are done with your assignment and want to submit your marks, you need to run the checking program one last time on the CLS (not from CentOS) and submit the output file from the CLS, as follows:
Do all this on the Course Linux Server when you are ready to submit:
abcd0001
.assignment99
.cst0001
.Log in to the CLS. Go to your assignment Base Directory on the CLS.
There is a Checking Program named assignment
NN
check
in the assignment Source Directory on the CLS, where NN
is replaced by your current assignment number, e.g. assignment99check
for Assignment 99. Use the current assignment number, not 99
.
Create a Symbolic Link to this program named check
under your assignment Base Directory on the CLS so that you can easily run the program to check your work and assign your work a mark on the CLS. Note: You can create a symbolic link to this executable program but you do not have permission to read or copy the program file.
Execute the above “check” program on the CLS using its symbolic link. (Review the Search Path notes if you forget how to run a program by pathname from the command line.) This program will check your fetched CentOS work from the latest tar
archive, assign you a mark, and display the output on your screen. (You may want to paginate the long output so you can read all of it.)
You may run the check
program as many times as you wish, to correct mistakes and get the best mark. Some task sections require you to finish the whole section before running the checking program at the end; you may not always be able to run the checking program successfully after every single task step.
Remember: The checking program run on the CLS does not fetch new files to the CLS from your CentOS VM. You must run the Fetch program on your CentOS VM to update the
tar
archive on the CLS so that the checking program can mark the latest CentOS information.
assignment
NN
.txt
in your Base Directory on the CLS, where NN
is replaced by your current assignment number, e.g. assignment99.txt
for Assignment 99
. Use the current assignment number, not 99
.
YOUR MARK for
assignment
NN
.txt
(containing the output from the Checking Program) from the CLS to your local computer.
YOUR MARK for
assignment
NN
.txt
file from your local computer to the correct Assignment area on Blackboard (with the exact name) before the due date:
Use only Attach File on the Upload Assignment page. Do not enter any text into the Text Submission or Comments boxes on Blackboard; I do not read them. Use only the Attach File section followed by the Submit button. If you need to comment on any assignment submission, send me EMail.
You can revise and upload the file more than once using the Start New button on the Review Submission History page to open a new Upload Assignment page. I only look at the most recent submission.
You must upload the file with the correct name from your local computer; you cannot correct the name as you upload it to Blackboard.
You will also see the Review Submission History page any time you already have an assignment attempt uploaded and you click on the underlined assignmentNN link. You can use the Start New button on this page to re-upload your assignment as many times as you like.
You cannot delete an assignment attempt, but you can always upload a new version. I only mark the latest version.
Your instructor may also mark files in your directory in your CLS account after the due date. Leave everything there on the CLS. Do not delete any assignment work from the CLS until after the term is over!
I do not accept any assignment submissions by EMail. Use only the Blackboard Attach File. No word processor documents. Plain Text only.
Use the exact file name given above. Upload only one single file of Linux-format plain text, not HTML, not RTF, not MSWord. No fonts, no word-processing. Linux plain text only.
NO EMAIL, WORD PROCESSOR, PDF, RTF, or HTML DOCUMENTS ACCEPTED.
No marks are awarded for submitting under the wrong assignment number or for using the wrong file name. Use the exact 16-character, lower-case name given above.
WARNING: Some inattentive students don’t read all these words. Don’t make that mistake! Be exact.
READ ALL THE WORDS. OH PLEASE, PLEASE, PLEASE READ ALL THE WORDS!