Open main menu

CDOT Wiki β

Changes

SYA710 Lab02

1,547 bytes added, 10:27, 17 September 2008
no edit summary
</li>
<li>Save your carpald script in directory /usr/local/sbin. Make sure the owner and permissions are set correctly. </li>
<li>Now run the command:</li> <pre> chkconfig --add carpal
</pre>
</li> <li>Now switch to runlevel 3 with the command:</li> <pre> telinit 3
</pre>
</li>
<li>Login as joker and observe what happens.
</li>
<ol>
<li>Login to UbuntuHH Test as root.</li>
<li>Now create a script named carpald - this script will be thedaemon. Your carpald script can look something like this - but feelfree to elaborate. <pre>#!/bin/sh#loop foreverwhile :do # now sleep for 30 seconds sleep 30 # after wakeup send message to all users wall &lt;&lt;EOF Ok people! Time to take a break before you get carpal tunnel syndrome!EOFdone</pre> </li><li>Save your carpald script in directory /usr/local/sbin. Make sure the owner and permissions are set correctly. </li><li>Now create a job file named carpal (use vi) and place it in /etc/event.d/ directory. Ensure the permissions are set correctly. </li><pre># carpal - carpald ## This service manages carpald to notify users of typing breaks # started until it is shut down again. start on stopped rc2start on stopped rc3start on stopped rc4start on stopped rc5 stop on runlevel 0stop on runlevel 1stop on runlevel 6 respawnexec /usr/local/sbin/carpald</pre><li>Now check carpal's status with this command:</li><pre> status carpal</pre><li>Start the carpal service with this command:</li><pre> start carpal</pre><li>Again check the status of the carpal service:</li><pre> status carpal</pre><li>Open several terminals and wait 30 seconds and observe what happens.</li><li>Once you're sure the carpal service is running properly, you can stop it with this command:</li><pre> stop carpal</pre> <li>Answer the remaining questions in PART C and email your answers to your teacher. </li><li>Write a short blog about Linux startup. </li>
</ol>
=== PART C: - Questions ===
63
edits