Homework 1: Due Feb 1, 2000 right after intermission. Using the template for "rc" given in class: for file in /etc/rc$runlevel.d/K??* do sh $file stop done for file in /etc/rc$runlevel.d/S??* do sh $file start done write a fully functional one. It should require an argument (the runlevel), make sure the directories exists, and then do the above task. Don't use the root directory, but use something under your home directory (ie don't use /etc, use $HOME/cs501/hw1/etc) using a variable setting at the top of your "rc": ROOTDIR=$HOME/cs501/hw1 for file in $ROOTDIR/etc/rc$runlevel.d/K??* ... Also, write an init.d script to use with your "rc" script. Use a fake program "foo" as the service to start. Imagine that it stores its PID in $ROOTDIR/var/run/foo.pid If you are having a hard time imagining such an application, use the foo.c that I wrote: http://www.classes.cs.uchicago.edu/classes/current/CS501/homework/foo.c Homeworks should be printed, not handwritten. Points will be given as follows (nothing in between): 5 - Both scripts are right 3 - One script is right 1 - Neither script is right.