/[gentoo]/xml/htdocs/doc/en/handbook/hb-working-rcscripts.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-working-rcscripts.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.21 Revision 1.22
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 5<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-rcscripts.xml,v 1.21 2005/05/06 22:32:54 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-rcscripts.xml,v 1.22 2005/05/19 23:10:20 neysx Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>1.18</version> 11<version>1.19</version>
12<date>2005-05-06</date> 12<date>2005-05-20</date>
13 13
14<section> 14<section>
15<title>Runlevels</title> 15<title>Runlevels</title>
16<subsection> 16<subsection>
17<title>Booting your System</title> 17<title>Booting your System</title>
648</p> 648</p>
649 649
650</body> 650</body>
651</subsection> 651</subsection>
652<subsection> 652<subsection>
653<title>Using SOFTLEVEL</title> 653<title>Using softlevel</title>
654<body> 654<body>
655 655
656<p> 656<p>
657First of all, create the runlevel directory for your second "default" runlevel. 657First of all, create the runlevel directory for your second "default" runlevel.
658As an example we create the <path>offline</path> runlevel: 658As an example we create the <path>offline</path> runlevel:
667you want to have an exact copy of your current <c>default</c> runlevel but 667you want to have an exact copy of your current <c>default</c> runlevel but
668without <c>net.eth0</c>: 668without <c>net.eth0</c>:
669</p> 669</p>
670 670
671<pre caption="Adding the necessary init scripts"> 671<pre caption="Adding the necessary init scripts">
672# <i>ls /etc/runlevels/default</i> 672<comment>(Copy all services from default runlevel to offline runlevel)</comment>
673acpid domainname local net.eth0 netmount postfix syslog-ng vixie-cron 673# <i>for service in /etc/runlevels/default/*; do rc-update add $service offline; done</i>
674# <i>rc-update add acpid offline</i> 674<comment>(Remove unwanted service from offline runlevel)</comment>
675# <i>rc-update add domainname offline</i> 675# <i>rc-update del net.eth0 offline</i>
676<comment>(Display active services for offline runlevel)</comment>
676# <i>rc-update add local offline</i> 677# <i>rc-update show offline</i>
677# <i>rc-update add syslog-ng offline</i> 678<comment>(Partial sample Output)</comment>
678# <i>rc-update add vixie-cron offline</i> 679 acpid | offline
680 domainname | offline
681 local | offline
682 net.eth0 |
679</pre> 683</pre>
680 684
681<p> 685<p>
682Now edit your bootloader configuration and add a new entry for the 686Now edit your bootloader configuration and add a new entry for the
683<c>offline</c> runlevel. For instance, in <path>/boot/grub/grub.conf</path>: 687<c>offline</c> runlevel. For instance, in <path>/boot/grub/grub.conf</path>:
688 root (hd0,0) 692 root (hd0,0)
689 kernel (hd0,0)/kernel-2.4.25 root=/dev/hda3 <i>softlevel=offline</i> 693 kernel (hd0,0)/kernel-2.4.25 root=/dev/hda3 <i>softlevel=offline</i>
690</pre> 694</pre>
691 695
692<p> 696<p>
693Voila, you're all set now. If you boot your system and select the newly added 697Voilà, you're all set now. If you boot your system and select the newly added
694entry at boot, the <c>offline</c> runlevel will be used instead of the 698entry at boot, the <c>offline</c> runlevel will be used instead of the
695<c>default</c> one. 699<c>default</c> one.
696</p> 700</p>
697 701
698</body> 702</body>
699</subsection> 703</subsection>
700<subsection> 704<subsection>
701<title>Using BOOTLEVEL</title> 705<title>Using bootlevel</title>
702<body> 706<body>
703 707
704<p> 708<p>
705Using <c>bootlevel</c> is completely analogous to <c>softlevel</c>. The only 709Using <c>bootlevel</c> is completely analogous to <c>softlevel</c>. The only
706difference here is that you define a second "boot" runlevel instead of a second 710difference here is that you define a second "boot" runlevel instead of a second

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.20