
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.funtoo.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.funtoo.org/index.php?title=Stacked_Runlevels&amp;feed=atom&amp;action=history</id>
		<title>Stacked Runlevels - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.funtoo.org/index.php?title=Stacked_Runlevels&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/index.php?title=Stacked_Runlevels&amp;action=history"/>
		<updated>2013-06-19T11:38:53Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.6</generator>

	<entry>
		<id>http://www.funtoo.org/index.php?title=Stacked_Runlevels&amp;diff=2692&amp;oldid=prev</id>
		<title>Drobbins: Created page with &quot;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 ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/index.php?title=Stacked_Runlevels&amp;diff=2692&amp;oldid=prev"/>
				<updated>2010-11-21T02:59:41Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;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 ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; runlevel. This can be done like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# install -d /etc/runlevels/static&lt;br /&gt;
# install -d /etc/runlevels/dynamic&amp;lt;/pre&amp;gt;&lt;br /&gt;
Two new runlevels, &amp;lt;tt&amp;gt;static&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;dynamic&amp;lt;/tt&amp;gt;, have now been created. Now, we will make these runlevels children of the &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; runlevel using the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# rc-update --stack add default static&lt;br /&gt;
# rc-update --stack add default dynamic&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, the runlevels &amp;lt;tt&amp;gt;static&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;dynamic&amp;lt;/tt&amp;gt; will consist of anything in &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; '''plus''' any additional scripts you add to each new runlevel.&lt;br /&gt;
&lt;br /&gt;
To complete our multiple network configuration, we would now do something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# rc-update add netif.eth0 static&lt;br /&gt;
# rc-update add dhcpcd dynamic&amp;lt;/pre&amp;gt;&lt;br /&gt;
To switch to or between each runlevel, we would type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# rc static&amp;lt;/pre&amp;gt;&lt;br /&gt;
Or:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# rc dynamic&amp;lt;/pre&amp;gt;&lt;br /&gt;
If we wanted to boot into &amp;lt;tt&amp;gt;dynamic&amp;lt;/tt&amp;gt; by default, this could be done by editing &amp;lt;tt&amp;gt;/etc/inittab&amp;lt;/tt&amp;gt; and modifying this line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;l3:3:wait:/sbin/rc default&amp;lt;/pre&amp;gt;&lt;br /&gt;
To read as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;l3:3:wait:/sbin/rc dynamic&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Drobbins</name></author>	</entry>

	</feed>