<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SoftDux Technical Blog &#187; init</title>
	<atom:link href="http://blog.softdux.com/tag/init/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.softdux.com</link>
	<description>Software, Linux &#38; Networking Blog &#38; HOWTOs, Web Development</description>
	<lastBuildDate>Wed, 01 Sep 2010 14:23:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to add rc.local support to Debian 4.0 servers</title>
		<link>http://blog.softdux.com/howtos/how-to-add-rclocal-support-to-debian-40-servers</link>
		<comments>http://blog.softdux.com/howtos/how-to-add-rclocal-support-to-debian-40-servers#comments</comments>
		<pubDate>Sun, 19 Apr 2009 14:46:51 +0000</pubDate>
		<dc:creator>Rudi</dc:creator>
				<category><![CDATA[HOWTO's]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[init]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[rc.local]]></category>
		<category><![CDATA[update-rc]]></category>

		<guid isPermaLink="false">http://blog.softdux.com/?p=142</guid>
		<description><![CDATA[Debian 4.0 doesn&#8217;t have an /etc/rc.local file, so if you&#8217;re used to adding your own startup scripts to /etc/rc.local then you will need to add this file manually as follows: 1 2 3 4 5 6 7 8 9 10 11 echo &#34;#!/bin/bash&#34; &#62; /etc/init.d/rc.local &#160; echo &#34;# Add all the scripts to run after [...]]]></description>
			<content:encoded><![CDATA[<p>Debian 4.0 doesn&#8217;t have an /etc/rc.local file, so if you&#8217;re used to adding your own startup scripts to /etc/rc.local then you will need to add this file manually as follows:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="vim" style="font-family:monospace;color: #FCFFBA;"><span style="color: #804040;color: #B83A24;">echo</span> <span style="color: #C5A22D;color: #666666;">&quot;#!/bin/bash&quot;</span> <span style="color: #000000;color: #CCC;">&gt;</span> <span style="color: #000000;color: #CCC;">/</span>etc<span style="color: #000000;color: #CCC;">/</span>init<span style="color: #000000;color: #CCC;">.</span>d<span style="color: #000000;color: #CCC;">/</span>rc<span style="color: #000000;color: #CCC;">.</span>local
&nbsp;
<span style="color: #804040;color: #B83A24;">echo</span> <span style="color: #C5A22D;color: #666666;">&quot;# Add all the scripts to run after system startup&quot;</span> <span style="color: #000000;color: #CCC;">&gt;&gt;</span> <span style="color: #000000;color: #CCC;">/</span>etc<span style="color: #000000;color: #CCC;">/</span>init<span style="color: #000000;color: #CCC;">.</span>d<span style="color: #000000;color: #CCC;">/</span>rc<span style="color: #000000;color: #CCC;">.</span>local
&nbsp;
<span style="color: #804040;color: #B83A24;">echo</span> <span style="color: #C5A22D;color: #666666;">&quot;iptables-restore &lt; /root/custom_firewall_rules&quot;</span> <span style="color: #000000;color: #CCC;">&gt;&gt;</span> <span style="color: #000000;color: #CCC;">/</span>etc<span style="color: #000000;color: #CCC;">/</span>init<span style="color: #000000;color: #CCC;">.</span>d<span style="color: #000000;color: #CCC;">/</span>rc<span style="color: #000000;color: #CCC;">.</span>local
&nbsp;
chmod <span style="color: #000000;color: #CCC;">+</span>x <span style="color: #000000;color: #CCC;">/</span>etc<span style="color: #000000;color: #CCC;">/</span>init<span style="color: #000000;color: #CCC;">.</span>d<span style="color: #000000;color: #CCC;">/</span>rc<span style="color: #000000;color: #CCC;">.</span>local
&nbsp;
ln <span style="color: #000000;color: #CCC;">-</span>s <span style="color: #000000;color: #CCC;">/</span>etc<span style="color: #000000;color: #CCC;">/</span>init<span style="color: #000000;color: #CCC;">.</span>d<span style="color: #000000;color: #CCC;">/</span>rc<span style="color: #000000;color: #CCC;">.</span>local <span style="color: #000000;color: #CCC;">/</span>etc<span style="color: #000000;color: #CCC;">/</span>rc<span style="color: #000000;color: #CCC;">.</span>local
&nbsp;
update<span style="color: #000000;color: #CCC;">-</span>rc<span style="color: #000000;color: #CCC;">.</span>d <span style="color: #000000;color: #CCC;">-</span>f rc<span style="color: #000000;color: #CCC;">.</span>local start <span style="color: #000000; font-weight:bold;color: #DDD;">99</span> <span style="color: #000000; font-weight:bold;color: #DDD;">2</span> <span style="color: #000000; font-weight:bold;color: #DDD;">3</span> <span style="color: #000000; font-weight:bold;color: #DDD;">4</span> <span style="color: #000000; font-weight:bold;color: #DDD;">5</span> <span style="color: #000000;color: #CCC;">.</span></pre></td></tr></table></div>

<p>This will create an <em>/etc/init.d/rc.local</em> (needed for Debian to work properly) file, and add a rule to restore the custom iptables rule that I have saved in the <em>/root/ </em>folder.</p>
<p>Then we make the file executable, and lastly update the rc environment to detect &amp; use <em>rc.local</em> as a startup file. On the last line I have some numbers: &#8220;<em>99</em>&#8220;, &#8220;<em>2</em>&#8220;, &#8220;<em>3</em>&#8220;, &#8220;<em>4</em>&#8221; &amp; &#8220;<em>5</em>&#8221; &#8211; this tells the update script to run the script very last the start-up sequence (i.e. #99), and then activate it for run levels 2,3,4 &amp; 5.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.softdux.com%2Fhowtos%2Fhow-to-add-rclocal-support-to-debian-40-servers&amp;title=How%20to%20add%20rc.local%20support%20to%20Debian%204.0%20servers&amp;bodytext=Debian%204.0%20doesn%27t%20have%20an%20%2Fetc%2Frc.local%20file%2C%20so%20if%20you%27re%20used%20to%20adding%20your%20own%20startup%20scripts%20to%20%2Fetc%2Frc.local%20then%20you%20will%20need%20to%20add%20this%20file%20manually%20as%20follows%3A%0D%0A%0D%0A%0D%0Aecho%20%22%23%21%2Fbin%2Fbash%22%20%3E%20%2Fetc%2Finit.d%2Frc.local%0D%0A%0D%0Aecho%20%22%23%20Add%20all%20the%20script" title="Digg"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fblog.softdux.com%2Fhowtos%2Fhow-to-add-rclocal-support-to-debian-40-servers" title="Sphinn"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fblog.softdux.com%2Fhowtos%2Fhow-to-add-rclocal-support-to-debian-40-servers&amp;title=How%20to%20add%20rc.local%20support%20to%20Debian%204.0%20servers&amp;notes=Debian%204.0%20doesn%27t%20have%20an%20%2Fetc%2Frc.local%20file%2C%20so%20if%20you%27re%20used%20to%20adding%20your%20own%20startup%20scripts%20to%20%2Fetc%2Frc.local%20then%20you%20will%20need%20to%20add%20this%20file%20manually%20as%20follows%3A%0D%0A%0D%0A%0D%0Aecho%20%22%23%21%2Fbin%2Fbash%22%20%3E%20%2Fetc%2Finit.d%2Frc.local%0D%0A%0D%0Aecho%20%22%23%20Add%20all%20the%20script" title="del.icio.us"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.softdux.com%2Fhowtos%2Fhow-to-add-rclocal-support-to-debian-40-servers&amp;t=How%20to%20add%20rc.local%20support%20to%20Debian%204.0%20servers" title="Facebook"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fblog.softdux.com%2Fhowtos%2Fhow-to-add-rclocal-support-to-debian-40-servers&amp;title=How%20to%20add%20rc.local%20support%20to%20Debian%204.0%20servers" title="Mixx"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.softdux.com%2Fhowtos%2Fhow-to-add-rclocal-support-to-debian-40-servers&amp;title=How%20to%20add%20rc.local%20support%20to%20Debian%204.0%20servers&amp;annotation=Debian%204.0%20doesn%27t%20have%20an%20%2Fetc%2Frc.local%20file%2C%20so%20if%20you%27re%20used%20to%20adding%20your%20own%20startup%20scripts%20to%20%2Fetc%2Frc.local%20then%20you%20will%20need%20to%20add%20this%20file%20manually%20as%20follows%3A%0D%0A%0D%0A%0D%0Aecho%20%22%23%21%2Fbin%2Fbash%22%20%3E%20%2Fetc%2Finit.d%2Frc.local%0D%0A%0D%0Aecho%20%22%23%20Add%20all%20the%20script" title="Google Bookmarks"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="De.lirio.us"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/" title="De.lirio.us" alt="De.lirio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="mailto:?subject=How%20to%20add%20rc.local%20support%20to%20Debian%204.0%20servers&amp;body=http%3A%2F%2Fblog.softdux.com%2Fhowtos%2Fhow-to-add-rclocal-support-to-debian-40-servers" title="email"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="Furl"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/" title="Furl" alt="Furl" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fblog.softdux.com%2Fhowtos%2Fhow-to-add-rclocal-support-to-debian-40-servers&amp;headline=How%20to%20add%20rc.local%20support%20to%20Debian%204.0%20servers&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.softdux.com%2Fhowtos%2Fhow-to-add-rclocal-support-to-debian-40-servers&amp;title=How%20to%20add%20rc.local%20support%20to%20Debian%204.0%20servers&amp;source=SoftDux+Technical+Blog+Software%2C+Linux+%26amp%3B+Networking+Blog+%26amp%3B+HOWTOs%2C+Web+Development&amp;summary=Debian%204.0%20doesn%27t%20have%20an%20%2Fetc%2Frc.local%20file%2C%20so%20if%20you%27re%20used%20to%20adding%20your%20own%20startup%20scripts%20to%20%2Fetc%2Frc.local%20then%20you%20will%20need%20to%20add%20this%20file%20manually%20as%20follows%3A%0D%0A%0D%0A%0D%0Aecho%20%22%23%21%2Fbin%2Fbash%22%20%3E%20%2Fetc%2Finit.d%2Frc.local%0D%0A%0D%0Aecho%20%22%23%20Add%20all%20the%20script" title="LinkedIn"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fblog.softdux.com%2Fhowtos%2Fhow-to-add-rclocal-support-to-debian-40-servers&amp;t=How%20to%20add%20rc.local%20support%20to%20Debian%204.0%20servers" title="MySpace"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=How%20to%20add%20rc.local%20support%20to%20Debian%204.0%20servers&amp;url=http%3A%2F%2Fblog.softdux.com%2Fhowtos%2Fhow-to-add-rclocal-support-to-debian-40-servers" title="Slashdot"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.softdux.com%2Fhowtos%2Fhow-to-add-rclocal-support-to-debian-40-servers&amp;title=How%20to%20add%20rc.local%20support%20to%20Debian%204.0%20servers" title="StumbleUpon"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fblog.softdux.com%2Fhowtos%2Fhow-to-add-rclocal-support-to-debian-40-servers" title="Technorati"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="YahooMyWeb"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/" title="YahooMyWeb" alt="YahooMyWeb" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fblog.softdux.com%2Fhowtos%2Fhow-to-add-rclocal-support-to-debian-40-servers&amp;partner=sociable" title="Print"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="" title="TwitThis"><img src="http://blog.softdux.com/wp-content/plugins/sociable/images/" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.softdux.com/howtos/how-to-add-rclocal-support-to-debian-40-servers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
