<?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>IONCANNON &#187; linux</title>
	<atom:link href="http://www.ioncannon.net/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ioncannon.net</link>
	<description>Thoughts on Software Development and Engineering</description>
	<lastBuildDate>Tue, 03 Jan 2012 13:59:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<atom:link rel='hub' href='http://www.ioncannon.net/?pushpress=hub'/>
		<item>
		<title>Running Lotus Notes 8 on Linux with newer xulrunner</title>
		<link>http://www.ioncannon.net/linux/316/running-lotus-notes-8-on-linux-with-newer-xulrunner/</link>
		<comments>http://www.ioncannon.net/linux/316/running-lotus-notes-8-on-linux-with-newer-xulrunner/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 11:49:01 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[lotus notes]]></category>
		<category><![CDATA[xulrunner]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/?p=316</guid>
		<description><![CDATA[I recently got tired of running Lotus Notes under wine because I kept getting meeting invites that I couldn&#039;t accept. So I ventured out because I had heard that Notes now had a Linux client and sure enough it does. The install is huge but it went very smooth up until the point that I [...]]]></description>
			<content:encoded><![CDATA[<p>I recently got tired of running Lotus Notes under wine because I kept getting meeting invites that I couldn&#039;t accept. So I ventured out because I had heard that Notes now had a Linux client and sure enough it does. The install is huge but it went very smooth up until the point that I first launched to read my mail. At the point where it should have shown me the start screen I got an error dialog with the error &#034;JVM terminated. Exit code=160&#034; and a big stack trace. </p>
<p><a href="http://d28nuaxr58rcpu.cloudfront.net/img/notes8linux/Screenshot-IBM_Lotus_Notes.png"><img title="Lotus Notes error message" alt="Lotus Notes error message" src="http://d28nuaxr58rcpu.cloudfront.net/img/notes8linux/Screenshot-IBM_Lotus_Notes_small.png"/></a><br/>(Click the image to see a larger version)<br/></p>
<p>After digging around a little I found that the Eclipse framework/SWT expected an older version of xulrunner to be installed. The simple fix to get Notes running was to move the xulrunner libraries out of the way:</p>
<div class="codesnip-container" >mv /usr/lib/xulrunner-1.9/ /tmp/<br />
mv /tmp/xulrunner-1.9/  /usr/lib/</div>
<p>Now when I started Notes I was able to get all the way in and see the following error on the start page:</p>
<p><a href="http://d28nuaxr58rcpu.cloudfront.net/img/notes8linux/Screenshot-Getting_Started_-_IBM_Lotus_Notes_.png"><img title="Lotus Notes start page error" alt="Lotus Notes start page error" src="http://d28nuaxr58rcpu.cloudfront.net/img/notes8linux/Screenshot-Getting_Started_-_IBM_Lotus_Notes__small.png"/></a><br/>(Click the image to see a larger version)<br/></p>
<p>Now the key to getting Notes into a usable state is to close the &#034;Getting Started&#034; tab. If you don&#039;t do this you can never move xulrunner back into place. Once you have closed the tab exit out of Notes and then put the xulrunner libraries back where they belong.</p>
<p>Now you can start Notes without an issue, just make sure not to open anything that requires a web browser.</p>
<p><a href="http://d28nuaxr58rcpu.cloudfront.net/img/notes8linux/Screenshot-Home_-_IBM_Lotus_Notes_.png"><img title="Lotus Notes home page" alt="Lotus Notes home page" src="http://d28nuaxr58rcpu.cloudfront.net/img/notes8linux/Screenshot-Home_-_IBM_Lotus_Notes__small.png"/></a><br/>(Click the image to see a larger version)<br/></p>
<p>After going through this someone pointed me towards the latest 8.5 beta 2 release of Lotus Notes for Linux and after installing that I can report that it actually has fixed the issue. So whenever 8.5 comes out this should be fixed until another incompatible version of xulrunner comes out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/linux/316/running-lotus-notes-8-on-linux-with-newer-xulrunner/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>VNC on OS X + Devil&#039;s Pie = seamless desktop</title>
		<link>http://www.ioncannon.net/linux/164/vnc-on-os-x-devils-pie-seamless-desktop/</link>
		<comments>http://www.ioncannon.net/linux/164/vnc-on-os-x-devils-pie-seamless-desktop/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 12:28:34 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[utilities]]></category>
		<category><![CDATA[devilspie]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[vnc]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/?p=164</guid>
		<description><![CDATA[I&#039;ve been doing iPhone development lately using a mac mini. When we first started looking at developing for the iPhone it seemed like overkill to go out and buy multiple macbooks or one macbook to share between developers so instead we got a mac mini to share using Vine VNC. For reference we are able [...]]]></description>
			<content:encoded><![CDATA[<p>I&#039;ve been doing iPhone development lately using a mac mini. When we first started looking at developing for the iPhone it seemed like overkill to go out and buy multiple macbooks or one macbook to share between developers so instead we got a mac mini to share using <a href="http://www.testplant.com/products/vine_viewer">Vine VNC</a>. </p>
<p>For reference we are able to share the mac mini by taking advantage of <a href="http://en.wikipedia.org/wiki/Fast_user_switching">fast user switching</a> for more information see this guide on using <a href="http://www.testplant.com/products/vine_viewer/multidesktop">Multiple Desktop Sessions on Mac OS X</a>.</p>
<p>The VNC part is pretty easy once you have the multiple desktop sessions working. I&#039;ve been doing development on a linux box that has two monitors connected so I will open the desktop in one window and all the non-mac stuff in the other. After using the VNC desktop like that for a while I started to get annoyed by the window decorations so I looked to see what I could do to remove them and that is when I ran into <a href="http://burtonini.com/blog/computers/devilspie">Devil&#039;s Pie</a>.</p>
<p>Devil&#039;s Pie runs as an application in the background and watches for window events that you set up in a configuration file. When it sees the events it can do all kinds of fancy things to the window like remove decorations and set position. It turns out there isn&#039;t a lot of documentation on the configuration language but I did find a <a href="http://live.gnome.org/DevilsPie">configuration language reference</a>, a <a href="http://code.google.com/p/gdevilspie/">gnome configuration file editor</a> that kind of works depending on what you need it to do, a <a href="https://help.ubuntu.com/community/Devilspie">decent reference</a>, some <a href="http://foosel.org/linux/devilspie">configuration examples</a>, and best of all an <a href="http://ubuntu-tutorials.com/2007/07/25/how-to-set-default-workspace-size-and-window-effects-in-gnome/">example of how to remove window effects</a>. With all that I was able to cobble together the following configuration file:</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">(if (contains (window_name) &quot;VNC:&quot;) (begin (undecorate) (maximize) (geometry &quot;+1280+0&quot;)))</div>
</div>
<p>This says to undecorate, maximize, and set the geometry of any window that contains the value &#034;VNC:&#034;. The undecorate will strip the title bar and any border from the window, the maximize does what it says to the window, and the geometry in my case puts the window on the right hand screen. I tweaked the background for my account in OS X and the resulting combination of it all looks like this:</p>
<p><a href="http://d28nuaxr58rcpu.cloudfront.net/remotemac/macdesktop-1024.png"><img width="520" src="http://d28nuaxr58rcpu.cloudfront.net/remotemac/macdesktop-800.png"/></a><br/>(Click the image to see a larger version)<br/></p>
<p>So now I have what feels like an OS X box integrated right into my normal desktop.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/linux/164/vnc-on-os-x-devils-pie-seamless-desktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to transfer a Linux image from VirtualBox to Xen</title>
		<link>http://www.ioncannon.net/system-administration/80/how-to-transfer-linux-from-virtualbox-to-xen/</link>
		<comments>http://www.ioncannon.net/system-administration/80/how-to-transfer-linux-from-virtualbox-to-xen/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 19:19:11 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[virtual box]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/?p=80</guid>
		<description><![CDATA[There have been times recently when I wanted to pull a VirtualBox Linux instance I had into Xen. I kept thinking it had to be fairly easy but I kept putting off trying it until recently when I ran into something I wanted to install from a CD image into an Amazon EC2 AMI. It [...]]]></description>
			<content:encoded><![CDATA[<p>There have been times recently when I wanted to pull a <a href="http://www.virtualbox.org/">VirtualBox</a> Linux instance I had into Xen. I kept thinking it had to be fairly easy but I kept putting off trying it until recently when I ran into something I wanted to install from a CD image into an Amazon EC2 AMI. It turns out the main hurdle in transferring an image is lack of documentation.</p>
<p><span id="more-80"></span></p>
<p>I&#039;m using VirtualBox 2.1.0 so some of the following commands may not work with older versions. I learned the hard way that they have changed a number of tools for VirtualBox and some of the older tools where probably easier to use and documented better. I installed the package I was using from an ISO image and then started trying to extract the part that I needed from the VDI that was created.</p>
<p>My first attempt at extracting the partition required me to convert my dynamic VDI into a static image. To dump a dynamic VDI into a static image you run this command:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">VBoxManage convertdd <span class="re5">-static</span> abox.vdi <span class="sy0">/</span>tmp<span class="sy0">/</span>abox.img</div>
</div>
<p>I thought I could find the image by hand in the VDI after I had it in a raw format. There were a number of hints that I found that made me think I could just pull the partition out without much of a problem: <a href="http://forensicir.blogspot.com/2008/01/virtualbox-and-forensics-tools.html">VirtualBox and forensics tools</a> and <a href="http://forums.virtualbox.org/viewtopic.php?t=52&#038;start=0&#038;postdays=0&#038;postorder=asc&#038;highlight=">a forum post</a>. However I found that just looking around wasn&#039;t easy enough to find where the partition started so I moved on to trying to find something else that could scan the disk and find it.</p>
<p>I rand into <a href="http://www.cgsecurity.org/wiki/TestDisk">TestDisk</a> and gave it a try. When it would scan the disk it found the /boot partition but for some reason it wasn&#039;t finding the root partition so I moved on.</p>
<p>I then took a look at the <a href="http://forums.virtualbox.org/viewtopic.php?t=8046">format for VDI disks</a> to see if it was possible to pull it out given the header information with a simple program but that looked like it would be a lot of work so it was back to square one.</p>
<p>Along the way I happened to came across information about an undocumented command to <a href="http://www.virtualbox.org/changeset/12775">export</a> raw <a href="http://techokarma.blogspot.com/2008/10/v2p-virtual-to-physical-for-virtualbox.html">disk image</a>. This turned out to be the break I needed because running the following command will result in only the disk image itself without any VirtualBox residue:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">VBoxManage internalcommands converttoraw myosimage.vdi <span class="sy0">/</span>tmp<span class="sy0">/</span>myosimage.img</div>
</div>
<p>At this point things became a lot easier. There were multiple partitions on the resulting disk image but I only needed the / partition. To extract the root partition I first listed the partitions with this command:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">fdisk <span class="re5">-lu</span> myosimage.img</div>
</div>
<p>This output the following for my image:</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">You must set cylinders.<br />
You can do this from the extra functions menu.</p>
<p>Disk myosimage.img: 0 MB, 0 bytes<br />
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Disk identifier: 0x0003f47f</p>
<p>&nbsp; &nbsp; &nbsp; Device Boot &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Start &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End &nbsp; &nbsp; &nbsp; &nbsp; Blocks &nbsp; &nbsp;Id &nbsp;System<br />
myosimage.img1 &nbsp; * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;63 &nbsp; &nbsp; &nbsp; 208844 &nbsp; &nbsp; &nbsp; &nbsp;104391 &nbsp; 83 &nbsp;Linux<br />
myosimage.img2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;208845 &nbsp; &nbsp; &nbsp;3662819 &nbsp; &nbsp; 1726987+ &nbsp;83 &nbsp;Linux<br />
myosimage.img3 &nbsp; &nbsp; &nbsp; &nbsp; 3662820 &nbsp; &nbsp; 4192964 &nbsp; &nbsp; &nbsp; 265072+ &nbsp;82 &nbsp;Linux swap / Solaris</div>
</div>
<p>To figure out where the root partition starts I just multiplied the start sector by the number of bytes per sector:  208845 * 512 = 106928640</p>
<p>I then did a quick test to make sure I had the correct partition:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="kw2">mount</span> <span class="re5">-o</span> loop,<span class="re2">offset</span>=<span class="nu0">106928640</span> myosimage.img <span class="sy0">/</span>mnt<span class="sy0">/</span></div>
</div>
<p>This looked good so I extracted the partition from the disk and did a filesystem check on it:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="kw2">dd</span> <span class="kw1">if</span>=myosimage.img <span class="re2">of</span>=mypartimage.img <span class="re2">bs</span>=512 <span class="re2">skip</span>=208845 <span class="re2">count</span>=<span class="nu0">3453974</span><br />
e2fsck mypartimage.img</div>
</div>
<p>Extracting the partition you want is about 80% of the battle. Getting it to run under Xen after extraction is just a matter of fixing anything that was left out because the install was done under a &#034;real&#034; machine. </p>
<p>I add a nosegneg ld.so.conf directive and move /lib/tls directory out of the way first:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="kw3">echo</span> <span class="st0">&quot;hwcap 0 nosegneg&quot;</span> <span class="sy0">&gt;</span> &nbsp;<span class="sy0">/</span>mnt<span class="sy0">/</span>etc<span class="sy0">/</span>ld.so.conf.d<span class="sy0">/</span>nosegneg.conf<br />
<span class="kw2">mv</span> <span class="sy0">/</span>mnt<span class="sy0">/</span>lib<span class="sy0">/</span>tls <span class="sy0">/</span>mnt<span class="sy0">/</span>lib<span class="sy0">/</span>tls.disabled</div>
</div>
<p>Next the base device entries needed to be created:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="kw1">for</span> i <span class="kw1">in</span> console null zero ; <span class="kw1">do</span> <span class="sy0">/</span>sbin<span class="sy0">/</span>MAKEDEV <span class="re5">-d</span> <span class="sy0">/</span>mnt<span class="sy0">/</span>dev <span class="re5">-x</span> <span class="re1">$i</span> ; <span class="kw1">done</span></div>
</div>
<p>I then removed the disk label from the partition using e2label:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">e2label mypartimage.img <span class="st0">&quot;&quot;</span></div>
</div>
<p>Because I was sending this image to EC2 I recreated the fstab with the following entries that are specific to the way EC2 allocates disks to a node:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="sy0">/</span>dev<span class="sy0">/</span>sda1 &nbsp;<span class="sy0">/</span> &nbsp; &nbsp; &nbsp; &nbsp; ext3 &nbsp; &nbsp;defaults &nbsp; &nbsp; &nbsp; &nbsp;<span class="nu0">1</span> <span class="nu0">1</span><br />
<span class="sy0">/</span>dev<span class="sy0">/</span>sda2 &nbsp;<span class="sy0">/</span>mnt &nbsp; &nbsp; &nbsp;ext3 &nbsp; &nbsp;defaults &nbsp; &nbsp; &nbsp; &nbsp;<span class="nu0">1</span> <span class="nu0">2</span><br />
<span class="sy0">/</span>dev<span class="sy0">/</span>sda3 &nbsp;swap &nbsp; &nbsp; &nbsp;swap &nbsp; &nbsp;defaults &nbsp; &nbsp; &nbsp; &nbsp;<span class="nu0">0</span> <span class="nu0">0</span></div>
</div>
<p>The finally, again because I was going to EC2 I added a few scripts and created rc.local to let me in when the instance was started. </p>
<p>This seems to be a fairly easy process now that I have done it from start to finish once.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/system-administration/80/how-to-transfer-linux-from-virtualbox-to-xen/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Upgrading from Fedora 9 to Fedora 10 with yum</title>
		<link>http://www.ioncannon.net/system-administration/142/upgrading-from-fedora-9-to-fedora-10-with-yum/</link>
		<comments>http://www.ioncannon.net/system-administration/142/upgrading-from-fedora-9-to-fedora-10-with-yum/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 01:00:06 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[system administration]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/?p=142</guid>
		<description><![CDATA[Fedora 10 is out and once again it is time to upgrade. The upgrade from Fedora 9 to Fedora 10 is almost exactly like the upgrade from Fedora 8 to Fedora 9. Here are the steps you need to do the upgrade from Fedora 9 to Fedora 10. Before I go on about doing this [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://docs.fedoraproject.org/release-notes/f10/">Fedora 10</a> <a href="http://www.press.redhat.com/2008/11/24/ten-reasons-to-get-fired-up-over-fedora-10-final/">is out</a> and once again it is time to upgrade. The upgrade from Fedora 9 to Fedora 10 is almost exactly like the <a href="http://www.ioncannon.net/system-administration/138/upgrading-from-fedora-8-to-fedora-9-with-yum/">upgrade from Fedora 8 to Fedora 9</a>. Here are the steps you need to do the upgrade from Fedora 9 to Fedora 10.</p>
<p><span id="more-142"></span></p>
<p>Before I go on about doing this by hand you should know that you can use <a href="http://fedoraproject.org/wiki/Features/PreUpgrade">PreUpdate</a> once it populates with the latest update.</p>
<ol>
<li>yum update</li>
<li>yum clean all</li>
<li>I like to repeated update and clean all a second time to make sure everything got updated</li>
<li>Run the following command to update the yum repo on your box:
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">rpm -Uhv http://mirror.liberty.edu/pub/fedora/linux/releases/10/Fedora/i386/os/Packages/fedora-release-10-1.noarch.rpm http://mirror.liberty.edu/pub/fedora/linux/releases/10/Fedora/i386/os/Packages/fedora-release-notes-10.0.0-1.noarch.rpm</div>
</div>
</li>
<li>Next I had to do a &#034;yum clean all&#034; again before it picked up the change</li>
<li>Next do a yum -y update</li>
<li>After a couple hours or so it was ready for a reboot.</li>
<li>I always have to recompile my NVIDIA driver when I do a kernel update so this was no different. This was really the only thing that I needed to do to finish the upgrade.</li>
</ol>
<p>They have the upgrade down pat now. I&#039;m surprised at how easy it is to do this by hand even.</p>
<p>I also figured I would try PreUpgrade on a Fedora 9 system while I was at it. I did a &#034;yum install preupgrade&#034; and then ran preupgrade from the command line. The only problem was that it didn&#039;t list any available updates. I&#039;ll try again in a couple days and see if it shows up eventually.</p>
<p>Update: It looks like Fedora pushed out a new Fedora 9 preupgrade package that now displays Fedora 10.</p>
<p>Tags: <a href="http://technorati.com/tag/linux" rel="tag">linux</a>, <a href="http://technorati.com/tag/fedora" rel="tag"> fedora</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/system-administration/142/upgrading-from-fedora-9-to-fedora-10-with-yum/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>PowerDNS Makes Custom DNS Backends Easy</title>
		<link>http://www.ioncannon.net/system-administration/135/powerdns-custom-dns-backend/</link>
		<comments>http://www.ioncannon.net/system-administration/135/powerdns-custom-dns-backend/#comments</comments>
		<pubDate>Sun, 14 Sep 2008 22:55:41 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[utilities]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/?p=135</guid>
		<description><![CDATA[I ran into PowerDNS recently when I needed to find a DNS server that would allow me to produce custom responses to domain queries. I needed to have a request for a DNS entry return a different IP depending on some factors in a database and I needed that data to always be accurate (not [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into <a href="http://www.powerdns.com/">PowerDNS</a> recently when I needed to find a DNS server that would allow me to produce custom responses to domain queries. I needed to have a request for a DNS entry return a different IP depending on some factors in a database and I needed that data to always be accurate (not cached locally). I found that PowerDNS allows for a lot of customization and I ended up using its <a href="http://doc.powerdns.com/pipebackend-dynamic-resolution.html">piped backend for dynamic queries</a> feature.</p>
<p>With this level of customization you can do things like write your own <a href="http://en.wikipedia.org/wiki/DNS_Blacklist">DNS black list</a>, track who is making DNS requests, give out IP addresses based on a servers availability or use geographic information to return a different IP.</p>
<p><span id="more-135"></span></p>
<p>The following is an overview of how to set up your own PowerDNS piped backend process. To start out it may help to read the <a href="http://doc.powerdns.com/backends-detail.html">overview of the PowerDNS backend</a>. </p>
<p>Here is an example program that is run directly by PowerDNS using pipes:</p>
<div class="codesnip-container" >
<div class="java codesnip" style="font-family:monospace;"><span class="kw1">import</span> <span class="co2">java.io.BufferedReader</span><span class="sy0">;</span><br />
<span class="kw1">import</span> <span class="co2">java.io.InputStreamReader</span><span class="sy0">;</span><br />
<span class="kw1">import</span> <span class="co2">java.io.IOException</span><span class="sy0">;</span></p>
<p><span class="kw1">public</span> <span class="kw1">class</span> PowerDNSPipeTest<br />
<span class="br0">&#123;</span><br />
&nbsp; <span class="kw1">public</span> <span class="kw1">static</span> <span class="kw4">void</span> main<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a><span class="br0">&#91;</span><span class="br0">&#93;</span> args<span class="br0">&#41;</span> <span class="kw1">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Exception</span></a><br />
&nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Abufferedreader+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">BufferedReader</span></a> reader <span class="sy0">=</span> <span class="kw1">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Abufferedreader+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">BufferedReader</span></a><span class="br0">&#40;</span><span class="kw1">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ainputstreamreader+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">InputStreamReader</span></a><span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">in</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>&nbsp; &nbsp; readIntro<span class="br0">&#40;</span>reader<span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>&nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> line<span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="kw1">while</span><span class="br0">&#40;</span><span class="br0">&#40;</span>line <span class="sy0">=</span> reader.<span class="me1">readLine</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="sy0">!=</span> <span class="kw2">null</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; processLine<span class="br0">&#40;</span>line<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; <span class="kw1">private</span> <span class="kw1">static</span> <span class="kw4">void</span> processLine<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> line<span class="br0">&#41;</span><br />
&nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> values<span class="br0">&#91;</span><span class="br0">&#93;</span> <span class="sy0">=</span> line.<span class="me1">split</span><span class="br0">&#40;</span><span class="st0">&quot;<span class="es0">\t</span>&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>&nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>values.<span class="me1">length</span> <span class="sy0">==</span> <span class="nu0">6</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span class="co1">// Testing any a response to the ANY or A record request</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><span class="st0">&quot;ANY&quot;</span>.<span class="me1">equalsIgnoreCase</span><span class="br0">&#40;</span>values<span class="br0">&#91;</span>3<span class="br0">&#93;</span><span class="br0">&#41;</span> <span class="sy0">||</span> <span class="st0">&quot;A&quot;</span>.<span class="me1">equalsIgnoreCase</span><span class="br0">&#40;</span>values<span class="br0">&#91;</span>3<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">&#40;</span><span class="st0">&quot;DATA<span class="es0">\t</span>&quot;</span> <span class="sy0">+</span> values<span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span> <span class="sy0">+</span> <span class="st0">&quot;<span class="es0">\t</span>IN<span class="es0">\t</span>A<span class="es0">\t</span>0<span class="es0">\t</span>1800<span class="es0">\t</span>127.0.0.5&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">&#40;</span><span class="st0">&quot;LOG<span class="es0">\t</span>PowerDNS sent unpareable string&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">&#40;</span><span class="st0">&quot;FAIL&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">&#40;</span><span class="st0">&quot;END&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">flush</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; <span class="kw1">private</span> <span class="kw1">static</span> <span class="kw4">void</span> readIntro<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Abufferedreader+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">BufferedReader</span></a> reader<span class="br0">&#41;</span> <span class="kw1">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aioexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">IOException</span></a><br />
&nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> line <span class="sy0">=</span> reader.<span class="me1">readLine</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>line <span class="sy0">!=</span> <span class="kw2">null</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> values<span class="br0">&#91;</span><span class="br0">&#93;</span> <span class="sy0">=</span> line.<span class="me1">split</span><span class="br0">&#40;</span><span class="st0">&quot;<span class="es0">\t</span>&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>values.<span class="me1">length</span> <span class="sy0">==</span> <span class="nu0">2</span> <span class="sy0">&amp;&amp;</span> <span class="st0">&quot;HELO&quot;</span>.<span class="me1">equals</span><span class="br0">&#40;</span>values<span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span><span class="br0">&#41;</span> <span class="sy0">&amp;&amp;</span> <span class="st0">&quot;1&quot;</span>.<span class="me1">equals</span><span class="br0">&#40;</span>values<span class="br0">&#91;</span>1<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">&#40;</span><span class="st0">&quot;OK<span class="es0">\t</span>Backend starting&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">&#40;</span><span class="st0">&quot;FAIL&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">flush</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="sy0">-</span>1<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
<p>I found that for some reason PowerDNS didn&#039;t want to run the java command directly so I copied that class to /tmp and wrapped the command in a small shell script like this to see if that would fix the problem:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="co0">#!/bin/sh</span><br />
<span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>java<span class="sy0">/</span>bin<span class="sy0">/</span>java <span class="re5">-cp</span> <span class="sy0">/</span>tmp<span class="sy0">/</span> PowerDNSPipeTest</div>
</div>
<p>In the configuration file I then added:</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">launch=pipe<br />
pipe-command=/tmp/powerdns.sh</div>
</div>
<p>This works fine but PowerDNS spawns multiple backend processes to run the piped application and with java that seemed like a bad idea since it would create an entire JVM instance each time. So I decided to modify their sample perl program to send the requests to a long running java background process that would then just use threads.</p>
<div class="codesnip-container" >
<div class="perl codesnip" style="font-family:monospace;"><span class="co1">#!/usr/bin/perl -w</span></p>
<p><span class="kw2">use</span> strict<span class="sy0">;</span></p>
<p><span class="co5">$|</span><span class="sy0">=</span><span class="nu0">1</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1"># no buffering</span></p>
<p><span class="kw1">my</span> <span class="re0">$line</span><span class="sy0">=&lt;&gt;;</span><br />
<a href="http://perldoc.perl.org/functions/chomp.html"><span class="kw3">chomp</span></a><span class="br0">&#40;</span><span class="re0">$line</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p><span class="kw1">unless</span><span class="br0">&#40;</span><span class="re0">$line</span> <span class="kw1">eq</span> <span class="st0">&quot;HELO<span class="es0">\t</span>1&quot;</span><span class="br0">&#41;</span> <br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> <span class="st0">&quot;FAIL<span class="es0">\n</span>&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> <span class="kw2">STDERR</span> <span class="st0">&quot;Recevied &#039;$line&#039;<span class="es0">\n</span>&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">&lt;&gt;;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/exit.html"><span class="kw3">exit</span></a><span class="sy0">;</span><br />
<span class="br0">&#125;</span><br />
<a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> <span class="st0">&quot;OK &nbsp; &nbsp; &nbsp; Sample backend firing up<span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp;<span class="co1"># print our banner</span></p>
<p><span class="kw1">while</span><span class="br0">&#40;</span><span class="sy0">&lt;&gt;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> <span class="kw2">STDERR</span> <span class="st0">&quot;$$ Received: $_<span class="es0">\n</span>&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/chomp.html"><span class="kw3">chomp</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">my</span> <span class="re0">@arr</span><span class="sy0">=</span><a href="http://perldoc.perl.org/functions/split.html"><span class="kw3">split</span></a><span class="br0">&#40;</span><span class="co2">/\t/</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">@arr</span><span class="sy0">&lt;</span>6<span class="br0">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> <span class="st0">&quot;LOG &nbsp; &nbsp; &nbsp;PowerDNS sent unparseable line<span class="es0">\n</span>&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> <span class="st0">&quot;FAIL<span class="es0">\n</span>&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">next</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> <span class="kw2">STDERR</span> <span class="st0">&quot;$$ Sent A records<span class="es0">\n</span>&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> <span class="re0">&amp;sendRequest</span><span class="br0">&#40;</span><span class="co5">$_</span> <span class="sy0">.</span> <span class="st0">&quot;<span class="es0">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> <span class="kw2">STDERR</span> <span class="st0">&quot;$$ End of data<span class="es0">\n</span>&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> <span class="st0">&quot;END<span class="es0">\n</span>&quot;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></p>
<p><span class="kw2">sub</span> sendRequest <br />
<span class="br0">&#123;</span><br />
&nbsp; <span class="kw2">use</span> Socket<span class="sy0">;</span><br />
&nbsp; <span class="kw1">my</span><span class="br0">&#40;</span><span class="re0">$sockaddr</span><span class="sy0">,</span> <span class="re0">$this</span><span class="sy0">,</span> <span class="re0">$that</span><span class="sy0">,</span> <span class="re0">$thataddr</span><span class="sy0">,</span> <span class="re0">$thisaddr</span><span class="sy0">,</span> <span class="re0">$remote</span><span class="sy0">,</span> <span class="re0">$port</span><span class="sy0">,</span> <span class="re0">$iaddr</span><span class="sy0">,</span> <span class="re0">$paddr</span><span class="sy0">,</span> <span class="re0">$proto</span><span class="sy0">,</span> <span class="re0">$line</span><span class="sy0">,</span> <span class="re0">@output</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>&nbsp; <span class="re0">$remote</span> <span class="sy0">=</span> <span class="st0">&quot;127.0.0.1&quot;</span><span class="sy0">;</span><br />
&nbsp; <span class="re0">$port</span> <span class="sy0">=</span> <span class="nu0">4444</span><span class="sy0">;</span><br />
&nbsp; <span class="re0">$sockaddr</span> <span class="sy0">=</span> <span class="st_h">&#039;S n a4 x8&#039;</span><span class="sy0">;</span></p>
<p>&nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$port</span> <span class="sy0">=~</span> <span class="co2">/\D/</span><span class="br0">&#41;</span> <span class="br0">&#123;</span> <span class="re0">$port</span> <span class="sy0">=</span> <a href="http://perldoc.perl.org/functions/getservbyname.html"><span class="kw3">getservbyname</span></a><span class="br0">&#40;</span><span class="re0">$port</span><span class="sy0">,</span> <span class="st_h">&#039;tcp&#039;</span><span class="br0">&#41;</span> <span class="br0">&#125;</span><br />
&nbsp; <a href="http://perldoc.perl.org/functions/die.html"><span class="kw3">die</span></a> <span class="st0">&quot;No port&quot;</span> <span class="kw1">unless</span> <span class="re0">$port</span><span class="sy0">;</span><br />
&nbsp; <span class="re0">$thisaddr</span> &nbsp; <span class="sy0">=</span> <a href="http://perldoc.perl.org/functions/gethostbyname.html"><span class="kw3">gethostbyname</span></a><span class="br0">&#40;</span><span class="st0">&quot;localhost&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; <span class="re0">$thataddr</span> &nbsp; <span class="sy0">=</span> <a href="http://perldoc.perl.org/functions/gethostbyname.html"><span class="kw3">gethostbyname</span></a><span class="br0">&#40;</span><span class="re0">$remote</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; <span class="re0">$this</span> &nbsp; <span class="sy0">=</span> <a href="http://perldoc.perl.org/functions/pack.html"><span class="kw3">pack</span></a><span class="br0">&#40;</span><span class="re0">$sockaddr</span><span class="sy0">,</span> AF_INET<span class="sy0">,</span> 0<span class="sy0">,</span> <span class="re0">$thisaddr</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; <span class="re0">$that</span> &nbsp; <span class="sy0">=</span> <a href="http://perldoc.perl.org/functions/pack.html"><span class="kw3">pack</span></a><span class="br0">&#40;</span><span class="re0">$sockaddr</span><span class="sy0">,</span> AF_INET<span class="sy0">,</span> <span class="re0">$port</span><span class="sy0">,</span> <span class="re0">$thataddr</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>&nbsp; <span class="re0">$proto</span> &nbsp; <span class="sy0">=</span> <a href="http://perldoc.perl.org/functions/getprotobyname.html"><span class="kw3">getprotobyname</span></a><span class="br0">&#40;</span><span class="st_h">&#039;tcp&#039;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; <a href="http://perldoc.perl.org/functions/socket.html"><span class="kw3">socket</span></a><span class="br0">&#40;</span>SOCK<span class="sy0">,</span> PF_INET<span class="sy0">,</span> SOCK_STREAM<span class="sy0">,</span> <span class="re0">$proto</span><span class="br0">&#41;</span> &nbsp;<span class="sy0">||</span> <a href="http://perldoc.perl.org/functions/die.html"><span class="kw3">die</span></a> <span class="st0">&quot;socket: $!&quot;</span><span class="sy0">;</span><br />
&nbsp; <a href="http://perldoc.perl.org/functions/bind.html"><span class="kw3">bind</span></a><span class="br0">&#40;</span>SOCK<span class="sy0">,</span> <span class="re0">$this</span><span class="br0">&#41;</span> &nbsp; &nbsp;<span class="sy0">||</span> <a href="http://perldoc.perl.org/functions/die.html"><span class="kw3">die</span></a> <span class="st0">&quot;bind: $!&quot;</span><span class="sy0">;</span><br />
&nbsp; <a href="http://perldoc.perl.org/functions/connect.html"><span class="kw3">connect</span></a><span class="br0">&#40;</span>SOCK<span class="sy0">,</span> <span class="re0">$that</span><span class="br0">&#41;</span> &nbsp; &nbsp;<span class="sy0">||</span> <a href="http://perldoc.perl.org/functions/die.html"><span class="kw3">die</span></a> <span class="st0">&quot;connect: $!&quot;</span><span class="sy0">;</span><br />
&nbsp; <a href="http://perldoc.perl.org/functions/select.html"><span class="kw3">select</span></a><span class="br0">&#40;</span>SOCK<span class="br0">&#41;</span><span class="sy0">;</span> <span class="co5">$|</span> <span class="sy0">=</span> <span class="nu0">1</span><span class="sy0">;</span> <a href="http://perldoc.perl.org/functions/select.html"><span class="kw3">select</span></a><span class="br0">&#40;</span><span class="kw2">STDOUT</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>&nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> SOCK <span class="co5">@_</span><span class="sy0">;</span><br />
&nbsp; <span class="re0">@output</span> <span class="sy0">=</span> <span class="re4">&lt;SOCK&gt;</span><span class="sy0">;</span></p>
<p>&nbsp; <a href="http://perldoc.perl.org/functions/close.html"><span class="kw3">close</span></a> <span class="br0">&#40;</span>SOCK<span class="br0">&#41;</span> <span class="sy0">||</span> <a href="http://perldoc.perl.org/functions/die.html"><span class="kw3">die</span></a> <span class="st0">&quot;close: $!&quot;</span><span class="sy0">;</span><br />
&nbsp; <span class="re0">@output</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></div>
</div>
<p>Here is the code for the threaded java server modified from the above pipe example:</p>
<div class="codesnip-container" >
<div class="java codesnip" style="font-family:monospace;"><span class="kw1">import</span> <span class="co2">java.net.ServerSocket</span><span class="sy0">;</span><br />
<span class="kw1">import</span> <span class="co2">java.net.Socket</span><span class="sy0">;</span><br />
<span class="kw1">import</span> <span class="co2">java.io.*</span><span class="sy0">;</span><br />
<span class="kw1">import</span> <span class="co2">java.util.concurrent.PriorityBlockingQueue</span><span class="sy0">;</span><br />
<span class="kw1">import</span> <span class="co2">java.util.concurrent.ThreadPoolExecutor</span><span class="sy0">;</span><br />
<span class="kw1">import</span> <span class="co2">java.util.concurrent.TimeUnit</span><span class="sy0">;</span></p>
<p><span class="kw1">public</span> <span class="kw1">class</span> PowerDNSServerTest<br />
<span class="br0">&#123;</span><br />
&nbsp; <span class="kw1">public</span> <span class="kw1">static</span> <span class="kw4">void</span> main<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a><span class="br0">&#91;</span><span class="br0">&#93;</span> args<span class="br0">&#41;</span> <span class="kw1">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Exception</span></a><br />
&nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; PriorityBlockingQueue<span class="sy0">&lt;</span>Runnable<span class="sy0">&gt;</span> queue <span class="sy0">=</span> <span class="kw1">new</span> PriorityBlockingQueue<span class="sy0">&lt;</span>Runnable<span class="sy0">&gt;</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; ThreadPoolExecutor threadPool <span class="sy0">=</span> <span class="kw1">new</span> ThreadPoolExecutor<span class="br0">&#40;</span>5, 30, 30, TimeUnit.<span class="me1">SECONDS</span>, queue<span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>&nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aserversocket+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">ServerSocket</span></a> serverSocket <span class="sy0">=</span> <span class="kw1">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aserversocket+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">ServerSocket</span></a><span class="br0">&#40;</span>4444<span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>&nbsp; &nbsp; <span class="kw1">while</span><span class="br0">&#40;</span><span class="kw2">true</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; threadPool.<span class="me1">execute</span><span class="br0">&#40;</span><span class="kw1">new</span> PowerDNSServerClientThread<span class="br0">&#40;</span>serverSocket.<span class="me1">accept</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; <span class="kw1">private</span> <span class="kw1">static</span> <span class="kw1">class</span> PowerDNSServerClientThread <span class="kw1">implements</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Arunnable+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Runnable</span></a><br />
&nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw1">private</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asocket+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Socket</span></a> clientSocket<span class="sy0">;</span></p>
<p>&nbsp; &nbsp; <span class="kw1">public</span> PowerDNSServerClientThread<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asocket+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Socket</span></a> clientSocket<span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">clientSocket</span> <span class="sy0">=</span> clientSocket<span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">void</span> run<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">try</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Abufferedreader+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">BufferedReader</span></a> input <span class="sy0">=</span> <span class="kw1">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Abufferedreader+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">BufferedReader</span></a><span class="br0">&#40;</span><span class="kw1">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ainputstreamreader+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">InputStreamReader</span></a><span class="br0">&#40;</span>clientSocket.<span class="me1">getInputStream</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Abufferedwriter+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">BufferedWriter</span></a> output <span class="sy0">=</span> <span class="kw1">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Abufferedwriter+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">BufferedWriter</span></a><span class="br0">&#40;</span><span class="kw1">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aoutputstreamwriter+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">OutputStreamWriter</span></a><span class="br0">&#40;</span>clientSocket.<span class="me1">getOutputStream</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> command <span class="sy0">=</span> input.<span class="me1">readLine</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">err</span>.<span class="me1">println</span><span class="br0">&#40;</span><span class="st0">&quot;[&quot;</span> <span class="sy0">+</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Athread+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Thread</span></a>.<span class="me1">currentThread</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">getName</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="sy0">+</span> <span class="st0">&quot;] Received: &quot;</span> <span class="sy0">+</span> command<span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> values<span class="br0">&#91;</span><span class="br0">&#93;</span> <span class="sy0">=</span> command.<span class="me1">split</span><span class="br0">&#40;</span><span class="st0">&quot;<span class="es0">\t</span>&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>values.<span class="me1">length</span> <span class="sy0">==</span> <span class="nu0">6</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Testing any a response to the ANY or A record request</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><span class="st0">&quot;ANY&quot;</span>.<span class="me1">equalsIgnoreCase</span><span class="br0">&#40;</span>values<span class="br0">&#91;</span>3<span class="br0">&#93;</span><span class="br0">&#41;</span> <span class="sy0">||</span> <span class="st0">&quot;A&quot;</span>.<span class="me1">equalsIgnoreCase</span><span class="br0">&#40;</span>values<span class="br0">&#91;</span><span class="nu0">3</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.<span class="me1">write</span><span class="br0">&#40;</span><span class="st0">&quot;DATA<span class="es0">\t</span>&quot;</span> <span class="sy0">+</span> values<span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span> <span class="sy0">+</span> <span class="st0">&quot;<span class="es0">\t</span>IN<span class="es0">\t</span>A<span class="es0">\t</span>0<span class="es0">\t</span>1800<span class="es0">\t</span>127.0.0.5<span class="es0">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.<span class="me1">write</span><span class="br0">&#40;</span><span class="st0">&quot;LOG<span class="es0">\t</span>PowerDNS sent unpareable string<span class="es0">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.<span class="me1">write</span><span class="br0">&#40;</span><span class="st0">&quot;FAIL<span class="es0">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; output.<span class="me1">write</span><span class="br0">&#40;</span><span class="st0">&quot;END<span class="es0">\n</span>&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; output.<span class="me1">flush</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; output.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; input.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; clientSocket.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">catch</span> <span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aioexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">IOException</span></a> e<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; e.<span class="me1">printStackTrace</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
<p>In the config file I replaced the above entries with:</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">launch=pipe<br />
pipe-command=/tmp/powerdns.pl</div>
</div>
<p>That is all there is to it. So far this is the easiest way I have found of passing requests on to an application. The configuration for PowerDNS also allows you to force a request to the backend with every query eliminating the internal cache. For me that was a needed feature since every request could potentially change from second to second and the latest IP would need to be given out. I found that there are a lot of options for small tweaks like this that are probably on the fringe of what 99% of users need but are very handy to be able to change when you need to change them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/system-administration/135/powerdns-custom-dns-backend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading from Fedora 8 to Fedora 9 with yum</title>
		<link>http://www.ioncannon.net/system-administration/138/upgrading-from-fedora-8-to-fedora-9-with-yum/</link>
		<comments>http://www.ioncannon.net/system-administration/138/upgrading-from-fedora-8-to-fedora-9-with-yum/#comments</comments>
		<pubDate>Wed, 14 May 2008 01:52:51 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[system administration]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/?p=138</guid>
		<description><![CDATA[A new release of Fedora is out again so it is time to check out the upgrade. This time it is the Fedora 9 release. The upgrade from Fedora 8 to Fedora 9 is almost exactly like the upgrade to Fedora 8. Here are the steps you need to do the upgrade from Fedora 8 [...]]]></description>
			<content:encoded><![CDATA[<p>A new release of Fedora is out again so it is time to check out the upgrade. This time it is the <a href="http://docs.fedoraproject.org/release-notes/">Fedora 9 release</a>. The upgrade from Fedora 8 to Fedora 9 is almost exactly like the <a href="http://www.ioncannon.net/system-administration/133/upgrading-from-fedora-7-to-fedora-8-with-yum/">upgrade to Fedora 8</a>. Here are the steps you need to do the upgrade from Fedora 8 to Fedora 9:</p>
<p><span id="more-138"></span></p>
<p>As someone points out in the comments there is a new facility to do upgrades that you can install. See the following wiki entry about the <a href="http://fedoraproject.org/wiki/Features/PreUpgrade">PreUpgrade</a>. I tried to use PreUpgrade but it didn&#039;t install the update boot option for some reason but maybe others will have better luck.</p>
<ol>
<li>yum update</li>
<li>yum clean all</li>
<li>I like to repeated update and clean all a second time to make sure everything got updated</li>
<li>Run the following command to update the yum repo on your box:
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">rpm -Uhv http://mirror.liberty.edu/pub/fedora/linux/releases/9/Fedora/i386/os/Packages/fedora-release-9-2.noarch.rpm http://mirror.liberty.edu/pub/fedora/linux/releases/9/Fedora/i386/os/Packages/fedora-release-notes-9.0.0-1.noarch.rpm</div>
</div>
</li>
<li>Next I had to do a &#034;yum clean all&#034; again before it picked up the change</li>
<li>Next do a yum -y update</li>
<li>As in the past, a few packages had to be removed to get the dependencies to work out. In this case I had to remove the beryl-manager, VirtualBox and cups. In the case of cups I noted what got removed so I could re-install it later.</li>
<li>The packages have grown a little and this time I had to wait for 1.4G of packages to download and install. After an hour or so it was ready for a reboot.</li>
<li>After a reboot I had problems getting my NVIDIA driver to load. I ended up having to download the latest beta version of the driver per this forum post: http://www.nvnews.net/vbulletin/showthread.php?t=111460</li>
<li>I recompiled my NVIDIA driver and then added the flag for X suggested in the forum. GDM wouldn&#039;t start because the flag was set there but I can live with that.</li>
<li>Now I have X but I&#039;ve run into a number of issues getting apps to run correctly. For example firefox won&#039;t start without the &#8211;sync option. At this point I think it will just be a matter of time before things get worked out, until then I&#039;m just going to wait it out. At least it boots and mostly works.</li>
</ol>
<p>Update: I think I may have found one of the issues with X and that is the fonts changed in Fedora 9. See <a href="http://fedoraproject.org/wiki/Releases/9/ReleaseSummary#head-f96ff8f24487c77aba8e45738bbe2dfb4aa52ac5">Fedora 9 Fonts</a>. I re-added the old fonts and now apps are starting correctly.</p>
<p>Tags: <a href="http://technorati.com/tag/linux" rel="tag">linux</a>, <a href="http://technorati.com/tag/fedora" rel="tag"> fedora</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/system-administration/138/upgrading-from-fedora-8-to-fedora-9-with-yum/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Upgrading from Fedora 7 to Fedora 8 with yum</title>
		<link>http://www.ioncannon.net/system-administration/133/upgrading-from-fedora-7-to-fedora-8-with-yum/</link>
		<comments>http://www.ioncannon.net/system-administration/133/upgrading-from-fedora-7-to-fedora-8-with-yum/#comments</comments>
		<pubDate>Thu, 08 Nov 2007 21:51:08 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[system administration]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/system-administration/133/upgrading-from-fedora-7-to-fedora-8-with-yum/</guid>
		<description><![CDATA[Fedora 8 has been released so it is time to upgrade once again. First you should go back and upgrade to Fedora 7 if you haven&#039;t already. From there it is even easier this time to upgrade. Here are the steps you need to do the upgrade from Fedora 7 to Fedora 8: yum update [...]]]></description>
			<content:encoded><![CDATA[<p>Fedora 8 has been <a href="http://docs.fedoraproject.org/release-notes/">released</a> so it is time to upgrade once again. First you should go back and <a href="http://www.ioncannon.net/linux/68/upgrading-from-fc6-to-fedora7-with-yum/">upgrade to Fedora 7</a> if you haven&#039;t already. From there it is even easier this time to upgrade. Here are the steps you need to do the upgrade from Fedora 7 to Fedora 8:</p>
<ol>
<li>yum update</li>
<li>yum clean all</li>
<li>I like to repeated update and clean all a second time to make sure everything got updated</li>
<li>Run the following command to update the yum repo on your box:
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">rpm -Uhv http://mirror.anl.gov/pub/fedora/linux/releases/8/Fedora/i386/os/Packages/fedora-release-8-3.noarch.rpm &nbsp;http://mirror.anl.gov/pub/fedora/linux/releases/8/Fedora/i386/os/Packages/fedora-release-notes-8.0.0-3.noarch.rpm</div>
</div>
</li>
<li>Next do a yum -y update</li>
<li>I needed to remove a couple packages to get the dependencies to work out. This seems to be a normal need now when upgrading but isn&#039;t usually a big deal. In this case I had to remove the heliodor and beryl-settings that both had to do with beryl.</li>
<li>In my case the total set of packages it needed to download was 1.2G so it took about an hour to download and install. Now it was time for a reboot.</li>
<li>The reboot went so fast I almost didn&#039;t believe it rebooted. This was the smoothest upgrade I have had so far.</li>
</ol>
<p>Tags: <a href="http://technorati.com/tag/linux" rel="tag">linux</a>, <a href="http://technorati.com/tag/fedora" rel="tag"> fedora</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/system-administration/133/upgrading-from-fedora-7-to-fedora-8-with-yum/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
		<item>
		<title>Upgrading from FC6 to Fedora 7 with yum</title>
		<link>http://www.ioncannon.net/linux/68/upgrading-from-fc6-to-fedora7-with-yum/</link>
		<comments>http://www.ioncannon.net/linux/68/upgrading-from-fc6-to-fedora7-with-yum/#comments</comments>
		<pubDate>Sat, 02 Jun 2007 10:32:57 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/linux/68/upgrading-from-fc6-to-fc7-with-yum/</guid>
		<description><![CDATA[Now that Fedora 7 has been release it is time to upgrade from that crusty old Fedora Core 6. Note that they have removed the &#034;Core&#034; from the name so a few things have changed with the paths used in yum. Last year I did a post on how to upgrade from FC5 to FC6 [...]]]></description>
			<content:encoded><![CDATA[<p>Now that Fedora 7 has been release it is time to upgrade from that crusty old Fedora Core 6. Note that they have removed the &#034;Core&#034; from the name so a few things have changed with the paths used in yum. Last year I did a post on how to <a href="http://www.ioncannon.net/system-administration/99/upgrade-fc5-to-fc6-with-yum/">upgrade from FC5 to FC6</a> and this upgrade happened on the first box I used for that.</p>
<ol>
<li>Before you start see the note after these steps about checking for disk labels</li>
<li>yum update</li>
<li>yum clean all</li>
<li>I repeated update and clean all a second time to make sure everything got updated</li>
<li>I then ran the command:
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">rpm -Uhv http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Fedora/x86_64/os/Fedora/fedora-release-7-3.noarch.rpm http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Fedora/x86_64/os/Fedora/fedora-release-notes-7.0.0-1.noarch.rpm</div>
</div>
</li>
<li>I then found that I had to move fedora-development.repo and fedora-updates.repo out of /etc/yum.repos.d/ and replace them with fedora-development.repo.rpmnew and fedora-updates.repo.rpmnew. I also needed to remove a custom repo I had but no longer used so I didn&#039;t take time to figure out why it needed to be removed.</li>
<li>I then did a yum -y update and waited</li>
<li>After a good wait another X server was started so you may think about not doing the update while running under X. Luckily it was able to start on another console so all was ok. Now it was time for a reboot.</li>
<li>After the reboot I had to fix up some NVidia issues but overall it looks like it upgraded without a problem</li>
</ol>
<p>Notes on disk labels:</p>
<p>There are a few things listed in the release notes under <a href="http://docs.fedoraproject.org/release-notes/f7/en_US/sn-Installer.html#Upgrade-Related-Issues">Upgrade Related Issues</a>.</p>
<p>The first was to make sure all your drives have labels. You can do this by running the command &#034;/sbin/blkid&#034; and then checking that each line that is not part of the LVM system has a LABEL entry. If you need to add a label to a drive use the &#034;/sbin/e2label&#034; command and then edit your /etc/fstab to use the label on boot instead of the device.</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">LABEL=/boot &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /boot &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ext3 &nbsp; &nbsp;defaults &nbsp; &nbsp; &nbsp; &nbsp;1 2</div>
</div>
<p>You don&#039;t need to label LVM drives since the LVM keeps track of the drives it uses on its own. The only drive I had on a stock install that wasn&#039;t under the LVM was /boot and it had a label already.</p>
<p>After you upgrade they sugest running the following command and then upgrading anything that has a date before the upgrade date:</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">rpm -qa &#8211;last &gt; RPMS_by_Install_Time.txt</div>
</div>
<p>Tags: <a href="http://technorati.com/tag/linux" rel="tag">linux</a>, <a href="http://technorati.com/tag/fedora" rel="tag"> fedora</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/linux/68/upgrading-from-fc6-to-fedora7-with-yum/feed/</wfw:commentRss>
		<slash:comments>93</slash:comments>
		</item>
		<item>
		<title>Acrobat Reader 7 and FC6</title>
		<link>http://www.ioncannon.net/system-administration/121/acrobat-reader-7-and-fc6/</link>
		<comments>http://www.ioncannon.net/system-administration/121/acrobat-reader-7-and-fc6/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 13:41:54 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[utilities]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/system-administration/121/acrobat-reader-7-and-fc6/</guid>
		<description><![CDATA[I broke down and wanted to install Adobe Acrobat Reader 7 on my FC6 box to replace xpdf. After installing it from the tar.gz version the acroread startup script bombed out with the error: expr substr 2400000000000 1 After a little searching I didn&#039;t find much help so I started looking at the script myself [...]]]></description>
			<content:encoded><![CDATA[<p>I broke down and wanted to install Adobe Acrobat Reader 7 on my FC6 box to replace xpdf. After installing it from the tar.gz version the acroread startup script bombed out with the error: expr substr 2400000000000 1</p>
<p>After a little searching I didn&#039;t find much help so I started looking at the script myself to see if I could track down the problem. It turns out that it wasn&#039;t that hard to fix. First off the script file was located at: /usr/bin/acroread</p>
<p>Open the script file and find the function named &#034;check_gtk_ver_and_set_lib_path&#034;. This is the location of the first error you will hit. To fix the error you will need to change:</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">base_version=`expr substr &quot;${base_version}0000000000&quot; 1 $len_version`</div>
</div>
<p>to</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">blah1=&quot;${base_version}0000000000&quot;<br />
base_version=${blah1:1:$len_version}</div>
</div>
<p>You will find this two places and it needs to be changed in both. If you don&#039;t notice the 2nd place it is right after the first in a loop:</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">while [ $len_version -gt $len_base_version ]; do</div>
</div>
<p>The second problem you will have is located in the function &#034;get_gtk_file_ver&#034;. Find this function and change the following line:</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">echo $mfile| sed &#039;s/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g&#039;</div>
</div>
<p>to</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">echo $mfile| sed &#039;s/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]\)000.\([0-9]*\)\|\(.*\)/\1\2\3/g&#039;</div>
</div>
<p>Now you should be able to run acroread without errors.</p>
<p>Tags: <a href="http://technorati.com/tag/acroread" rel="tag">acroread</a>, <a href="http://technorati.com/tag/fedora" rel="tag"> fedora</a>, <a href="http://technorati.com/tag/script" rel="tag"> script</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/system-administration/121/acrobat-reader-7-and-fc6/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to create and use Flash video metadata to add cue-points with flvtool2</title>
		<link>http://www.ioncannon.net/web-design/109/metadata-cuepoint-flash-video-flvtool/</link>
		<comments>http://www.ioncannon.net/web-design/109/metadata-cuepoint-flash-video-flvtool/#comments</comments>
		<pubDate>Fri, 08 Dec 2006 13:31:09 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[utilities]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/web-design/109/metadata-cuepoint-flash-video-flvtool/</guid>
		<description><![CDATA[Adding cue-points allows you to spice up your flash videos created with FFMpeg. Adding metadata to a FLV will allow you to introduce cue-points that have their own metadata that can be display when the cue-point is reached or let you jump to that cue-point. In the following tutorial you will learn how to add [...]]]></description>
			<content:encoded><![CDATA[<p>Adding cue-points allows you to spice up your <a href="http://www.ioncannon.net/linux/105/create-flash-videos-ffmpeg/">flash videos created with FFMpeg</a>. Adding metadata to a FLV will allow you to introduce cue-points that have their own metadata that can be display when the cue-point is reached or let you jump to that cue-point. In the following tutorial you will learn how to add metadata to your FLV files using <a href="http://inlet-media.de/flvtool2">flvtool2</a> and how it is useful for adding cue-points.<br />
<span id="more-109"></span></p>
<p>Metadata is added to a FLV file with flvtool2 using the following XML format:</p>
<div class="codesnip-container" >
<div class="xml codesnip" style="font-family:monospace;"><span class="sc3"><span class="re1">&lt;tags<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;metatag</span> <span class="re0">event</span>=<span class="st0">&quot;onCuePoint&quot;</span> <span class="re0">overwrite</span>=<span class="st0">&quot;true&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;name<span class="re2">&gt;</span></span></span>Cue Point 1<span class="sc3"><span class="re1">&lt;/name<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;timestamp<span class="re2">&gt;</span></span></span>2000<span class="sc3"><span class="re1">&lt;/timestamp<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;parameters<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;textinfo<span class="re2">&gt;</span></span></span>This is some text 1<span class="sc3"><span class="re1">&lt;/textinfo<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;thumb<span class="re2">&gt;</span></span></span>test1.jpg<span class="sc3"><span class="re1">&lt;/thumb<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/parameters<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;type<span class="re2">&gt;</span></span></span>navigation<span class="sc3"><span class="re1">&lt;/type<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/metatag<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;metatag</span> <span class="re0">event</span>=<span class="st0">&quot;onCuePoint&quot;</span> <span class="re0">overwrite</span>=<span class="st0">&quot;true&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;name<span class="re2">&gt;</span></span></span>Cue Point 2<span class="sc3"><span class="re1">&lt;/name<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;timestamp<span class="re2">&gt;</span></span></span>4000<span class="sc3"><span class="re1">&lt;/timestamp<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;parameters<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;textinfo<span class="re2">&gt;</span></span></span>This is some text 2<span class="sc3"><span class="re1">&lt;/textinfo<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;thumb<span class="re2">&gt;</span></span></span>test2.jpg<span class="sc3"><span class="re1">&lt;/thumb<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/parameters<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;type<span class="re2">&gt;</span></span></span>navigation<span class="sc3"><span class="re1">&lt;/type<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/metatag<span class="re2">&gt;</span></span></span><br />
<span class="sc3"><span class="re1">&lt;/tags<span class="re2">&gt;</span></span></span></div>
</div>
<p>Most of the tags are obvious but the following tags are important to point out:</p>
<ul>
<li>metatag &#8211; When the overwrite flag is set to true the metadata is overwritten at the given timestamp</li>
<li>timestamp &#8211; This is where to put the metadata in milliseconds from the start of the FLV</li>
<li>parameters &#8211; This is the metadata for the given metadata. It allows you to specify any named parameter that will then be turned into a map available to your actionscript in the flash player playing your FLV file.</li>
<li>type &#8211; This specifies what this metadata is used for. The options are: navigation, event</li>
</ul>
<p>The following syntax is used when running flvtool2:</p>
<p>Usage: flvtool2 [-ACDPUVaciklnoprstvx]&#8230; [-key:value]&#8230; in-path|stdin [out-path|stdout]</p>
<p>Note that you can add any key-value pair by specifying them here. From the help the key-value pair: key:value &#8211; Key-value-pair for onMetaData tag (overwrites generated values).</p>
<p>After building your metadata xml file with the above syntax you would run a command like the following:</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">flvtool2 -AUtP mymeta.xml -thumbLocation:http://localhost/thumb test.flv</div>
</div>
<p>Now that you know how to create metadata and cue-points we can talk about one of the things you can do with them. With FFMpeg you can generate thumbnails of your FLV using the following command:</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">ffmpeg -i test.flv -an -ss 00:00:06 -r 1 -vframes 1 %d.jpg</div>
</div>
<p>That command tells FFMpeg to open the file test.flv with no audio support then seek to the 6th second. After seeking to the 6th second it records 1 frame at a framerate of 1. Here are the description of each option from the FFMpeg help:</p>
<ul>
<li>-i = input video</li>
<li>-an = disable audio</li>
<li>-ss = set the start time offset</li>
<li>-r = set frame rate</li>
<li>-vframes = number of frames to record</li>
</ul>
<p>Now we need to put these two things together with a flash video player that will use the cue-point metadata. One such player is the open source flash video player <a href="http://flowplayer.sourceforge.net/">FlowPlayer</a>. To get the following to work you will need to have a streaming video server to stream the FLV from.</p>
<p>I started with the public domain video from the following page: <a href="http://www.archive.org/details/merry_melodies_fresh_hare">Archive.org &#8211; Merry Melodies Fresh Hare</a>. I encoded 17 seconds, starting at the 3rd second and ending at the 20th, of the video with ffmpeg.</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">wget http://www.archive.org/download/merry_melodies_fresh_hare/merry_melodies_fresh_hare.mpg<br />
ffmpeg -ss 00:03:00 -t 00:00:20 -i merry_melodies_fresh_hare.mpg -s 320&#215;240 -ar 22050 -r 12 test.flv</div>
</div>
<p>Next I created 4 thumbnails at 4 second intervals using ffmpeg at a size of 110&#215;80 each:</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">ffmpeg -i test.flv -an -ss 00:00:04 -r 1 -vframes 1 -s 110&#215;80 %d.jpg<br />
mv 1.jpg test1.jpg<br />
ffmpeg -i test.flv -an -ss 00:00:08 -r 1 -vframes 1 -s 110&#215;80 %d.jpg<br />
mv 1.jpg test2.jpg<br />
ffmpeg -i test.flv -an -ss 00:00:12 -r 1 -vframes 1 -s 110&#215;80 %d.jpg<br />
mv 1.jpg test3.jpg<br />
ffmpeg -i test.flv -an -ss 00:00:16 -r 1 -vframes 1 -s 110&#215;80 %d.jpg<br />
mv 1.jpg test4.jpg</div>
</div>
<p>The results are shown here:</p>
<p><img src="http://d28nuaxr58rcpu.cloudfront.net/cfvm-thumb/test1.jpg"/><img src="http://d28nuaxr58rcpu.cloudfront.net/cfvm-thumb/test2.jpg"/><img src="http://d28nuaxr58rcpu.cloudfront.net/cfvm-thumb/test3.jpg"/><img src="http://d28nuaxr58rcpu.cloudfront.net/cfvm-thumb/test4.jpg"/></p>
<p>I then created the following metadata xml file to specify the cue-points and the thumbnails for each:</p>
<div class="codesnip-container" >
<div class="xml codesnip" style="font-family:monospace;"><span class="sc3"><span class="re1">&lt;tags<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;metatag</span> <span class="re0">event</span>=<span class="st0">&quot;onCuePoint&quot;</span> <span class="re0">overwrite</span>=<span class="st0">&quot;true&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;name<span class="re2">&gt;</span></span></span>Cue Point 1<span class="sc3"><span class="re1">&lt;/name<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;timestamp<span class="re2">&gt;</span></span></span>4000<span class="sc3"><span class="re1">&lt;/timestamp<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;parameters<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;textinfo<span class="re2">&gt;</span></span></span>This is some text 1<span class="sc3"><span class="re1">&lt;/textinfo<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;thumb<span class="re2">&gt;</span></span></span>test1.jpg<span class="sc3"><span class="re1">&lt;/thumb<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/parameters<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;type<span class="re2">&gt;</span></span></span>navigation<span class="sc3"><span class="re1">&lt;/type<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/metatag<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;metatag</span> <span class="re0">event</span>=<span class="st0">&quot;onCuePoint&quot;</span> <span class="re0">overwrite</span>=<span class="st0">&quot;true&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;name<span class="re2">&gt;</span></span></span>Cue Point 2<span class="sc3"><span class="re1">&lt;/name<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;timestamp<span class="re2">&gt;</span></span></span>8000<span class="sc3"><span class="re1">&lt;/timestamp<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;parameters<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;textinfo<span class="re2">&gt;</span></span></span>This is some text 2<span class="sc3"><span class="re1">&lt;/textinfo<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;thumb<span class="re2">&gt;</span></span></span>test2.jpg<span class="sc3"><span class="re1">&lt;/thumb<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/parameters<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;type<span class="re2">&gt;</span></span></span>navigation<span class="sc3"><span class="re1">&lt;/type<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/metatag<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;metatag</span> <span class="re0">event</span>=<span class="st0">&quot;onCuePoint&quot;</span> <span class="re0">overwrite</span>=<span class="st0">&quot;true&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;name<span class="re2">&gt;</span></span></span>Cue Point 3<span class="sc3"><span class="re1">&lt;/name<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;timestamp<span class="re2">&gt;</span></span></span>8000<span class="sc3"><span class="re1">&lt;/timestamp<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;parameters<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;textinfo<span class="re2">&gt;</span></span></span>This is some text 3<span class="sc3"><span class="re1">&lt;/textinfo<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;thumb<span class="re2">&gt;</span></span></span>test3.jpg<span class="sc3"><span class="re1">&lt;/thumb<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/parameters<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;type<span class="re2">&gt;</span></span></span>navigation<span class="sc3"><span class="re1">&lt;/type<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/metatag<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;metatag</span> <span class="re0">event</span>=<span class="st0">&quot;onCuePoint&quot;</span> <span class="re0">overwrite</span>=<span class="st0">&quot;true&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;name<span class="re2">&gt;</span></span></span>Cue Point 4<span class="sc3"><span class="re1">&lt;/name<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;timestamp<span class="re2">&gt;</span></span></span>8000<span class="sc3"><span class="re1">&lt;/timestamp<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;parameters<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;textinfo<span class="re2">&gt;</span></span></span>This is some text 3<span class="sc3"><span class="re1">&lt;/textinfo<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;thumb<span class="re2">&gt;</span></span></span>test4.jpg<span class="sc3"><span class="re1">&lt;/thumb<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/parameters<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;type<span class="re2">&gt;</span></span></span>navigation<span class="sc3"><span class="re1">&lt;/type<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/metatag<span class="re2">&gt;</span></span></span><br />
<span class="sc3"><span class="re1">&lt;/tags<span class="re2">&gt;</span></span></span></div>
</div>
<p>And then I added it to the FLV file:</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">flvtool2 -AUtP test-meta.xml -thumbLocation:http://d28nuaxr58rcpu.cloudfront.net/cfvm-thumb test.flv</div>
</div>
<p>And here is the result (you need to hit play to get things started and clicking on the images will jump to the cue-points):</p>
<p><object type="application/x-shockwave-flash" width="450" height="500" data="http://d28nuaxr58rcpu.cloudfront.net/FlowPlayerLP.swf" id="FlowPlayerLP"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="http://d28nuaxr58rcpu.cloudfront.net/FlowPlayerLP.swf" /><param name="quality" value="high" /><param name="scale" value="noScale" /><param name="wmode" value="transparent" /><param name="flashvars" value="configFileName=http://d28nuaxr58rcpu.cloudfront.net/cfvm-thumb/fp.js" /></object></p>
<p>Tags: <a href="http://technorati.com/tag/flash+video" rel="tag">flash video</a>, <a href="http://technorati.com/tag/flowplayer" rel="tag"> flowplayer</a>, <a href="http://technorati.com/tag/flv" rel="tag"> flv</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/web-design/109/metadata-cuepoint-flash-video-flvtool/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
<enclosure url="http://www.archive.org/download/merry_melodies_fresh_hare/merry_melodies_fresh_hare.mpg" length="54904832" type="video/mpeg" />
		</item>
	</channel>
</rss>

