<?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>ejohansson.se &#187; tips</title>
	<atom:link href="http://ejohansson.se/tags/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://ejohansson.se</link>
	<description>Random bits about Linux, programming, computers and occasionally other stuff.</description>
	<lastBuildDate>Sun, 18 Apr 2010 20:23:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Wake on LAN with&#160;Debian</title>
		<link>http://ejohansson.se/archives/2009/12/31/wake-on-lan-with-debian/</link>
		<comments>http://ejohansson.se/archives/2009/12/31/wake-on-lan-with-debian/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 13:45:20 +0000</pubDate>
		<dc:creator>Erik Johansson</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ejohansson.se/?p=309</guid>
		<description><![CDATA[To enable Wake on LAN on a Asus P5E-V motherboard under Debian you can do the following. Since I have a Asus motherboard, that&#8217;s the only one I&#8217;ve tested, but except from the BIOS (which may differ a bit), the instructions should be the same for all motherboards/NIC that supports Wake on LAN. In the [...]]]></description>
			<content:encoded><![CDATA[<p>To enable <a href="http://en.wikipedia.org/wiki/Wake-on-LAN">Wake on LAN</a> on a Asus P5E-V motherboard under Debian you can do the following. Since I have a Asus motherboard, that&#8217;s the only one I&#8217;ve tested, but except from the BIOS (which may differ a bit), the instructions should be the same for all motherboards/NIC that supports Wake on LAN.</p>
<p>In the BIOS, enable &#8220;Power on by PCIE device&#8221;.</p>
<p>In Linux, first install ethtool and then check that Wake on LAN is supported by running the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>host$ ethtool eth0
...
        Supports Wake-on: g
        Wake-on: g
...</pre></div></div>

<p>The output should contain a &#8216;g&#8217; to indicate that the device can be woken by sending it a &#8220;magic packet&#8221;.</p>
<p>Enable Wake-on by running:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>host$ ethtool <span style="color: #660033;">-s</span> eth0 wol g</pre></div></div>

<p>Since this command must be run on every boot, add it to /etc/rc.local.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>host$ <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.local
...
ethtool <span style="color: #660033;">-s</span> eth0 wol g
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></div></div>

<p>As the last step we must make sure that halt doesn&#8217;t disable the network device. This is done by adding this line to /etc/default/halt:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">NETDOWN</span>=no</pre></div></div>

<p>We also need the MAC address to send the magic packet to.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>host$ <span style="color: #c20cb9; font-weight: bold;">ifconfig</span> eth0
eth0      Link encap:Ethernet  HWaddr 00:1e:8c:cf:d0:bb  
...</pre></div></div>

<p>Then shutdown the computer. On an other computer, install e.g. <a href="http://gsd.di.uminho.pt/jpo/software/wakeonlan/">wakeonlan</a> and run:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">user<span style="color: #000000; font-weight: bold;">@</span>other$ wakeonlan 00:1e:8c:cf:d0:bb</pre></div></div>

<p>The computer should now start.</p>
]]></content:encoded>
			<wfw:commentRss>http://ejohansson.se/archives/2009/12/31/wake-on-lan-with-debian/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>An alias to give the world some&#160;color</title>
		<link>http://ejohansson.se/archives/2007/02/14/an-alias-to-give-the-world-some-color/</link>
		<comments>http://ejohansson.se/archives/2007/02/14/an-alias-to-give-the-world-some-color/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 20:16:09 +0000</pubDate>
		<dc:creator>Erik Johansson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ejohansson.se/archives/2007/02/14/an-alias-to-give-the-world-some-color/</guid>
		<description><![CDATA[Just wanted to share my new favourite alias. Really nice, especially if you read a lot of source code using less and prefer colors. alias cless='LESSOPEN="&#124; highlight --ansi --force %s" less -NR' Tip: If you&#8217;d like more colors, replace &#8211;ansi with &#8211;xterm256.]]></description>
			<content:encoded><![CDATA[<p>Just wanted to share my new favourite alias. Really nice, especially if you read a lot of source code using less and prefer colors.</p>
<pre>
alias cless='LESSOPEN="| highlight --ansi --force %s" less -NR'
</pre>
<p>Tip: If you&#8217;d like more colors, replace &#8211;ansi with &#8211;xterm256.</p>
]]></content:encoded>
			<wfw:commentRss>http://ejohansson.se/archives/2007/02/14/an-alias-to-give-the-world-some-color/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My dspam&#160;configuration</title>
		<link>http://ejohansson.se/archives/2006/07/25/my-dspam-configuration/</link>
		<comments>http://ejohansson.se/archives/2006/07/25/my-dspam-configuration/#comments</comments>
		<pubDate>Tue, 25 Jul 2006 17:45:00 +0000</pubDate>
		<dc:creator>Erik Johansson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ejohansson.se/archives/2006/07/25/my-dspam-configuration/</guid>
		<description><![CDATA[Since I was asked by Adam to give some hints how to setup dspam, I&#8217;m posting snippets from my configuration in hope that it will help at least a bit. We&#8217;ll start with exim. First of all, we&#8217;ll need a router that will pass all incoming email through dspam. Since I use ldap to store [...]]]></description>
			<content:encoded><![CDATA[<p>Since I was <a href="http://ejohansson.se/archives/2006/05/14/dspam-sarge-backport/#comment-1810">asked by Adam</a> to give some hints how to setup dspam, I&#8217;m posting snippets from my configuration in hope that it will help at least a bit.</p>
<p>We&#8217;ll start with exim. First of all, we&#8217;ll need a router that will pass all incoming email through dspam. Since I use ldap to store all domains and users, it might look a bit intimidating. But, as always, <a href="http://exim.org/exim-html-4.62/doc/html/spec_html/index.html">the documentation</a> is your friend. Anyhow, the interesting part is the condition.</p>
<pre>
dspam_router:
  driver = accept
  no_verify
  domains = +virtual_domains
  hide local_parts = ${lookup ldap {user=LDAP_USER pass=LDAP_PASS \
    ldap:///dc=${quote_ldap_dn:$domain},ou=domains,dc=ejohansson,dc=se?uid?one?\
    (&#038;(objectClass=posixAccount)(uid=${quote_ldap:$local_part}@$domain))}\
    {${extract{1}{@}{$value}}} fail}
  local_part_suffix = +*
  local_part_suffix_optional

  # When to scan a message :
  # - it isn't already scanned
  # - it isn't local
  # - it is less than 512k in size
  condition = "${if and {\
    {!eq {$received_protocol}{spam-scanned}}\
    {!eq {$received_protocol}{local}}\
    { <= {$message_size}{512k}}\
    } {1}{0}}"
  headers_add = "X-FILTER-DSPAM: by $primary_hostname on $tod_full"
  transport = dspam_spamcheck
</pre>
<p>If the message matched the condition, it will be sent to the dspam_spamcheck transport. Which looks like follows.</p>
<pre>
dspam_spamcheck:
  driver = pipe
  command = "/usr/bin/dspam --deliver=innocent,spam \
    --user '${lc:$local_part}@${lc:$domain}' -- \
    -f '$sender_address' %u"
  home_directory = "/var/spool/dspam"
  current_directory = "/var/spool/dspam"
  user = dspam
  group = dspam
  log_output = true

  return_fail_output = true
  return_path_add = false
  message_prefix =
  message_suffix =
</pre>
<p>This will check the message and then send it to exim, to have it pass through the exim router chain once more. But this time, since we'll be using the spam-scanned protocol, it wont match the condition in dspam_router. But for this to work, we need to set the delivery agent in  dspam.conf.</p>
<pre>
TrustedDeliveryAgent "/usr/sbin/exim4 -oMr spam-scanned"
</pre>
<p>Then we need to give the dspam user right to set the received protocol. We do this by adding dspam to the list of trusted_users in our exim conf.</p>
<p>See the <a href="/files/dspam/">configuration files</a> for more details and the <a href="http://dspamwiki.expass.de/">DSPAM wiki</a> for even some more.</p>
<p>If you have comments or would like me too explain something a bit more, please don't hesitate to leave a comment or drop me a mail.</p>
]]></content:encoded>
			<wfw:commentRss>http://ejohansson.se/archives/2006/07/25/my-dspam-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>grep with&#160;color</title>
		<link>http://ejohansson.se/archives/2006/06/18/grep-with-color/</link>
		<comments>http://ejohansson.se/archives/2006/06/18/grep-with-color/#comments</comments>
		<pubDate>Sun, 18 Jun 2006 11:01:10 +0000</pubDate>
		<dc:creator>Erik Johansson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ejohansson.se/archives/2006/06/18/grep-with-color/</guid>
		<description><![CDATA[grep --color=always some_text * &#124; less -R /me like! (more)]]></description>
			<content:encoded><![CDATA[<pre>
grep --color=always some_text * | less -R
</pre>
<p>/me like! (<a href="http://www.linux.com/article.pl?sid=06/05/19/1920231">more</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://ejohansson.se/archives/2006/06/18/grep-with-color/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lexin in&#160;konqueror</title>
		<link>http://ejohansson.se/archives/2006/05/02/lexin-in-konqueror/</link>
		<comments>http://ejohansson.se/archives/2006/05/02/lexin-in-konqueror/#comments</comments>
		<pubDate>Tue, 02 May 2006 12:42:27 +0000</pubDate>
		<dc:creator>Erik Johansson</dc:creator>
				<category><![CDATA[kde]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ejohansson.se/archives/2006/05/02/lexin-in-konqueror/</guid>
		<description><![CDATA[If you speak swedish and use konqueror you might be interested in lexin.desktop and lexen.desktop. Download and place them in ~/.kde/share/services/searchproviders/ and you&#8217;ll be able to translate from swedish to english by entering lexin:katt in the location field and from english to swedish with lexen:cat.]]></description>
			<content:encoded><![CDATA[<p>If you speak swedish and use konqueror you might be interested in <a href="http://files.ejohansson.se/kde/lexin.desktop">lexin.desktop</a> and <a href="http://files.ejohansson.se/kde/lexen.desktop">lexen.desktop</a>. Download and place them in ~/.kde/share/services/searchproviders/ and you&#8217;ll be able to translate from swedish to english by entering lexin:katt in the location field and from english to swedish with lexen:cat.</p>
]]></content:encoded>
			<wfw:commentRss>http://ejohansson.se/archives/2006/05/02/lexin-in-konqueror/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using booleans to document&#160;code</title>
		<link>http://ejohansson.se/archives/2006/04/09/using-booleans-to-document-code/</link>
		<comments>http://ejohansson.se/archives/2006/04/09/using-booleans-to-document-code/#comments</comments>
		<pubDate>Sun, 09 Apr 2006 16:12:09 +0000</pubDate>
		<dc:creator>Erik Johansson</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ejohansson.se/archives/2006/04/09/using-booleans-to-document-code/</guid>
		<description><![CDATA[Today I want to share a tip on how to write self-documenting code that I picked up from the book Code Complete 2 by Steve McConnell. I will do this be showing you some code I just wrote, but let us start with the actual tip. Instead of merely testing a boolean expression, you can [...]]]></description>
			<content:encoded><![CDATA[<p>Today I want to share a tip on how to write self-documenting code that I picked up from the book <a href="http://www.amazon.com/gp/product/0735619670/">Code Complete 2</a> by Steve McConnell. I will do this be showing you some code I just wrote, but let us start with the actual tip.</p>
<blockquote cite="http://www.cc2e.com/" title="Steve McConnell"><p>
Instead of merely testing a boolean expression, you can assign the expression to a variable that makes the implication of the test unmistakable.
</p></blockquote>
<p>The following code was my first try, not employing the tip.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp-qt" style="font-family:monospace;"><span style="color: #0057AE;">void</span> CETabWidget<span style="color: #006E28;">::</span><span style="color: #2B74C7;">wheelEvent</span><span style="color: #006E28;">&#40;</span><span style="color: #22aadd;">QWheelEvent</span> <span style="color: #006E28;">*</span>e<span style="color: #006E28;">&#41;</span>
<span style="color: #006E28;">&#123;</span>
  <span style="color: #22aadd;">QTabBar</span> <span style="color: #006E28;">*</span>tabs <span style="color: #006E28;">=</span> tabBar<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
  <span style="color: #000000; font-weight:bold;">if</span> <span style="color: #006E28;">&#40;</span>e<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">y</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&lt;</span> tabs<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">y</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">||</span> e<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">y</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&gt;</span> <span style="color: #006E28;">&#40;</span>tabs<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">y</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">+</span> tabs.<span style="color: #2B74C7;">height</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
    e<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">ignore</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    return<span style="color: #006E28;">;</span>
  <span style="color: #006E28;">&#125;</span>
&nbsp;
  <span style="color: #888888;">// handle wheel event</span>
<span style="color: #006E28;">&#125;</span></pre></div></div>

<p>Even though I wrote the code myself, I have problems understanding it. And making sure it&#8217;s correct takes more than a quick glance. If you want to understand this code in six months, you have to add a comment. So let us take a look at the same code rewritten to use two extra booleans.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp-qt" style="font-family:monospace;"><span style="color: #0057AE;">void</span> CETabWidget<span style="color: #006E28;">::</span><span style="color: #2B74C7;">wheelEvent</span><span style="color: #006E28;">&#40;</span><span style="color: #22aadd;">QWheelEvent</span> <span style="color: #006E28;">*</span>e<span style="color: #006E28;">&#41;</span>
<span style="color: #006E28;">&#123;</span>
  <span style="color: #22aadd;">QTabBar</span> <span style="color: #006E28;">*</span>tabs <span style="color: #006E28;">=</span> tabBar<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
  <span style="color: #0057AE;">const</span> <span style="color: #0057AE;">bool</span> cursorAboveTabBar <span style="color: #006E28;">=</span> <span style="color: #006E28;">&#40;</span>e<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">y</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&lt;</span> tabs<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">y</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
  <span style="color: #0057AE;">const</span> <span style="color: #0057AE;">bool</span> cursorBelowTabBar <span style="color: #006E28;">=</span> <span style="color: #006E28;">&#40;</span>e<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">y</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&gt;</span> <span style="color: #006E28;">&#40;</span>tabs<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">y</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">+</span> tabs<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">height</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
  <span style="color: #000000; font-weight:bold;">if</span> <span style="color: #006E28;">&#40;</span>cursorAboveTabBar <span style="color: #006E28;">||</span> cursorBelowTabBar<span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
    e<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">ignore</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    return<span style="color: #006E28;">;</span>
  <span style="color: #006E28;">&#125;</span>
&nbsp;
  <span style="color: #888888;">// handle wheel event</span>
<span style="color: #006E28;">&#125;</span></pre></div></div>

<p>Now you can quickly figure out that the wheel event is only handled if the cursor is inside the tabBar. And it&#8217;s actually possible to take a quick look and be sure that the code is doing what it&#8217;s supposed to.</p>
<p>Of course, for this to be of any good, you need to give the boolean variables meaningful names. Naming them a and b wouldn&#8217;t help a bit.</p>
<p>The best thing with this approach? You don&#8217;t have to write comments and still get code that people can understand. Ah, the joy!</p>
]]></content:encoded>
			<wfw:commentRss>http://ejohansson.se/archives/2006/04/09/using-booleans-to-document-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Article: Easy backup with&#160;rdiff-backup</title>
		<link>http://ejohansson.se/archives/2006/02/10/article-easy-backup-with-rdiff-backup/</link>
		<comments>http://ejohansson.se/archives/2006/02/10/article-easy-backup-with-rdiff-backup/#comments</comments>
		<pubDate>Fri, 10 Feb 2006 22:10:56 +0000</pubDate>
		<dc:creator>Erik Johansson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ejohansson.se/archives/2006/02/10/article-easy-backup-with-rdiff-backup/</guid>
		<description><![CDATA[I have just published my first article: Automated and painless backup with rdiff-backup. [...] will show you how to setup and configure rdiff-backup to backup a set of specified directories on computer A in an automated, painless and secure way to computer B. The backup process will be initiated from computer B. This means that [...]]]></description>
			<content:encoded><![CDATA[<p>I have just published my first article: <a href="http://ejohansson.se/articles/system-administration/rdiff-backup/">Automated and painless backup with rdiff-backup</a>.</p>
<blockquote><p>
[...] will show you how to setup and configure rdiff-backup to backup a set of specified directories on computer A in an automated, painless and secure way to computer B. The backup process will be initiated from computer B. This means that this computer doesn&#8217;t have to be online 24/7. It also means that is relatively easy to make one computer a hub, backing up several servers.
</p></blockquote>
<p>My intention is that this will be the first article in a series about system administration and other interesting topics that deserves a more permanent place than a blog post. They will be written and updated as time permitts. But enough of this, head over to the <a href="http://ejohansson.se/articles/">articles section</a> and start taking backups. If you have any comments, please mail me or leave a comment at the end of the article.</p>
]]></content:encoded>
			<wfw:commentRss>http://ejohansson.se/archives/2006/02/10/article-easy-backup-with-rdiff-backup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress&#160;2.0.1</title>
		<link>http://ejohansson.se/archives/2006/02/02/wordpress-201/</link>
		<comments>http://ejohansson.se/archives/2006/02/02/wordpress-201/#comments</comments>
		<pubDate>Thu, 02 Feb 2006 13:39:11 +0000</pubDate>
		<dc:creator>Erik Johansson</dc:creator>
				<category><![CDATA[site news]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ejohansson.se/archives/2006/02/02/wordpress-201/</guid>
		<description><![CDATA[WordPress 2.0.1 was released two days ago. Since this release apparently fixes 114 bugs from version 2.0, there&#8217;s no reason not to upgrade. Since I have my site together with a pristine copy of the wordpress version I&#8217;m currently using in subversion, updating it is painless. First, download the new version and unpack it # [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordpress.org/development/2006/01/201-release/">WordPress 2.0.1 was released</a> two days ago. Since this release  apparently <a href="http://trac.wordpress.org/milestone/2.0.1">fixes 114 bugs</a> from version 2.0, there&#8217;s no reason not to upgrade.</p>
<p>Since I have my site together with a pristine copy of the wordpress version I&#8217;m currently using in <a href="http://subversion.tigris.org/">subversion</a>, updating it is painless.</p>
<p>First, <a href="http://wordpress.org/latest.tar.gz">download the new version</a> and unpack it</p>
<pre>
# tar zxvf latest.tar.gz
</pre>
<p>Import the new version to <em>wordpress/current</em> (handling new, renamed and deleted files) and tag it as version <em>2.0.1</em></p>
<pre>
# <a href="http://svnbook.red-bean.com/en/1.1/ch07s05.html#svn-ch-7-sect-4.2">svn_load_dirs</a> -t 2.0.1 https://svn.ejohansson.se/repos/erik/src/ejohansson.se/wordpress current wordpress/
</pre>
<p>Merge the changes between version 2.0 and 2.0.1 to my main development branch <em>trunk</em></p>
<pre># svn merge https://svn.ejohansson.se/repos/erik/src/ejohansson.se/wordpress/2.0/ https://svn.ejohansson.se/repos/erik/src/ejohansson.se/wordpress/2.0.1/ ejohansson.se/trunk</pre>
<p>In case of conflicts, handle them and then commit the updated site</p>
<pre># svn ci ejohansson.se/trunk -m "Updated wordpress to 2.0.1"</pre>
<p>Update the live site</p>
<pre># svn export ejohansson.se/trunk /home/www/ejohansson.se --force</pre>
<p>Surf to http://ejohansson.se/wp-admin/upgrade.php to upgrade the wordpress database.</p>
<p>Done!</p>
<p>Disclaimer: You should of course backup your database and deactivate all plugins before performing the last two steps. Just to be safe. I didn&#8217;t, and so far, nothing is broken. But your milage may vary!</p>
<p>More information</p>
<ul>
<li><a href="http://codex.wordpress.org/Upgrading_WordPress">Upgrading WordPress</a></li>
<li><a href="http://svnbook.red-bean.com/en/1.1/ch07s05.html">Subversion vendor branches</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ejohansson.se/archives/2006/02/02/wordpress-201/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
