Difference between pages "Stacked Runlevels" and "Category:Kernel"

From Funtoo
(Difference between pages)
Jump to: navigation, search
 
 
Line 1: Line 1:
It is common for a laptop user to use DHCP most of the time; however, they may also need to periodially connect to network where a static network configuration is required. This is a situation where a Funtoo Linux machine will require '''multiple''' network configurations. Funtoo Linux supports this.
+
[[Category:System]]
 
+
The recommended approach for doing this is to use multiple, stacked runlevels. To do this, you will need to create two new runlevels which are children of the <tt>default</tt> runlevel. This can be done like this:
+
 
+
<console># ##i##install -d /etc/runlevels/static
+
# ##i##install -d /etc/runlevels/dynamic</console>
+
Two new runlevels, <tt>static</tt> and <tt>dynamic</tt>, have now been created. Now, we will make these runlevels children of the <tt>default</tt> runlevel using the following commands:
+
 
+
<console># ##i##rc-update --stack add default static
+
# ##i##rc-update --stack add default dynamic</console>
+
Now, the runlevels <tt>static</tt> and <tt>dynamic</tt> will consist of anything in <tt>default</tt> '''plus''' any additional scripts you add to each new runlevel.
+
 
+
To complete our multiple network configuration, we would now do something like this:
+
 
+
<console># ##i##rc-update add netif.eth0 static
+
# ##i##rc-update add dhcpcd dynamic</console>
+
To switch to or between each runlevel, we would type:
+
 
+
<console># ##i##rc static</console>
+
Or:
+
 
+
<console># ##i##rc dynamic</console>
+
If we wanted to boot into <tt>dynamic</tt> by default, this could be done by editing <tt>/etc/inittab</tt> and modifying this line:
+
 
+
<pre>
+
l3:3:wait:/sbin/rc default
+
</pre>
+
 
+
To read as follows:
+
 
+
<pre>
+
l3:3:wait:/sbin/rc dynamic
+
</pre>
+
 
+
[[Category:HOWTO]]
+
[[Category:First Steps]]
+
[[Category:Official Documentation]]
+

Latest revision as of 00:23, 13 March 2014