rcS.xml 744 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <sect1 id="ch07-rcS">
  2. <title>Creating the rcS script</title>
  3. <para>The second main boot script is the <filename>rcS</filename> script.
  4. Create the <filename>/etc/init.d/rcS</filename> script by running the following
  5. command:</para>
  6. <para><screen><userinput>cat &gt; rcS &lt;&lt; "EOF"</userinput>
  7. #!/bin/sh
  8. # Begin /etc/init.d/rcS
  9. #
  10. # See the rc script for the extensive comments on the constructions
  11. # used here
  12. #
  13. runlevel=S
  14. prevlevel=N
  15. umask 022
  16. export runlevel prevlevel
  17. trap ":" INT QUIT TSTP
  18. #
  19. # Collect all the S scripts in /etc/rcS.d and execute them
  20. #
  21. for i in /etc/rcS.d/S*
  22. do
  23. [ ! -f "$i" ] &amp;&amp; continue;
  24. $i start
  25. done
  26. # End /etc/init.d/rcS
  27. <userinput>EOF</userinput></screen></para>
  28. </sect1>