<?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"
	>

<channel>
	<title>hex for life</title>
	<atom:link href="http://0x45.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://0x45.com</link>
	<description>about bits and bytes.</description>
	<pubDate>Wed, 11 Mar 2009 15:47:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
	<language>en</language>
			<item>
		<title>installing NetBackup client on ubuntu</title>
		<link>http://0x45.com/2009/03/netbackup-on-ubuntu/</link>
		<comments>http://0x45.com/2009/03/netbackup-on-ubuntu/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 16:57:38 +0000</pubDate>
		<dc:creator>jc</dc:creator>
		
		<category><![CDATA[0x45]]></category>

		<guid isPermaLink="false">http://0x45.com/?p=59</guid>
		<description><![CDATA[Veritas NetBackup needs compat-libstdc++-296, so we&#8217;ll have to download them.
If you&#8217;re running 64 bit, you&#8217;ll need to tell dpkg to ignore the libstdc package architecture.


apt-get install xinetd libc6-i386
wget http://ftp.acc.umu.se/mirror/ubuntu/pool/universe/g/gcc-2.95/libstdc++2.10-glibc2.2_2.95.4-24_i386.deb
sudo dpkg --force-architecture -i libstdc++2.10-glibc2.2_2.95.4-24_i386.deb
after that, in your NetBackup Client directory, edit: 
NBClients/anb/Clients/usr/openv/netbackup/client/Linux/RedHat2.4/cp_to_client
and look for /etc/rc.d/init.d/xinetd and remove the &#8220;rc.d/&#8221; from the path.

./install

and you&#8217;re good to go.
if [...]]]></description>
			<content:encoded><![CDATA[<p>Veritas NetBackup needs compat-libstdc++-296, so we&#8217;ll have to download them.<br />
If you&#8217;re running 64 bit, you&#8217;ll need to tell dpkg to ignore the libstdc package architecture.<br />
<span id="more-59"></span></p>
<pre class="code">
apt-get install xinetd libc6-i386
wget http://ftp.acc.umu.se/mirror/ubuntu/pool/universe/g/gcc-2.95/libstdc++2.10-glibc2.2_2.95.4-24_i386.deb
sudo dpkg --force-architecture -i libstdc++2.10-glibc2.2_2.95.4-24_i386.deb</pre>
<p>after that, in your NetBackup Client directory, edit: </p>
<p>NBClients/anb/Clients/usr/openv/netbackup/client/Linux/RedHat2.4/cp_to_client</p>
<p>and look for /etc/rc.d/init.d/xinetd and remove the &#8220;rc.d/&#8221; from the path.</p>
<pre class="code">
./install
</pre>
<p>and you&#8217;re good to go.<br />
if you have any patches, create a directory and put the patches in there, decompress and install:</p>
<pre class="code">
mkdir patches
mv NB_* patches
cd patches
tar xvf NB_CLT_60_6_M_XXXXXX.tar
tar xvf NB_JAV_60_6_M_XXXXXX.tar
./Vrts_pack.install</pre>
<p>More info <a href="http://ubuntuforums.org/archive/index.php/t-191339.html">here </a>.</p>
<p>Edit: Apparently there&#8217;s some problems with libgcc_s.so.1 (if you&#8217;re installing on a 64bit OS). Either it doesn&#8217;t find a suitable libgcc, or doesn&#8217;t find it at all. Same happens with libpam.so.0.</p>
<pre class="code">
me@server:~# telnet localhost 13782
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
bpcd: error while loading shared libraries: libgcc_s.so.1: wrong ELF class: ELFCLASS64
</pre>
<pre class="code">
me@server:~# telnet localhost 13782
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
bpcd: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
</pre>
<p>Fear not. This is what you&#8217;re looking for:</p>
<pre class="code">
sudo apt-get install lib32gcc1 ia32-libs
sudo ln -s /usr/lib32/libgcc_s.so.1  /usr/openv/lib/libgcc_s.so.1
sudo ln -s /lib32/libpam.so.0 /usr/openv/lib/libpam.so.0
</pre>
]]></content:encoded>
			<wfw:commentRss>http://0x45.com/2009/03/netbackup-on-ubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ubuntu and sata (fake) raid on a proliant ml320</title>
		<link>http://0x45.com/2009/02/ubuntu-and-sata-fake-raid-on-a-proliant-ml320/</link>
		<comments>http://0x45.com/2009/02/ubuntu-and-sata-fake-raid-on-a-proliant-ml320/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 13:35:27 +0000</pubDate>
		<dc:creator>jc</dc:creator>
		
		<category><![CDATA[0x45]]></category>

		<guid isPermaLink="false">http://0x45.com/?p=55</guid>
		<description><![CDATA[or any other &#8220;server&#8221; with a cheap sata raid card for that matter.
it fails, you can try the fakeraid howto for &#60; 8.10 versions, but your best shot is to use the 8.10 alternate install cd (only one that supports this feature).
It will prompt you to activate the embedded sata raid devices, which you&#8217;ll obviously [...]]]></description>
			<content:encoded><![CDATA[<p>or any other &#8220;server&#8221; with a cheap sata raid card for that matter.</p>
<p>it fails, you can try the fakeraid howto for &lt; 8.10 versions, but your best shot is to use the 8.10 alternate install cd (only one that supports this feature).</p>
<p>It will prompt you to activate the embedded sata raid devices, which you&#8217;ll obviously do, the rest of the installation is the same as a regular install, minus the graphic mode.</p>
<p>Chances are that you won&#8217;t be able to boot after the installation and get a busybox shell prompt with an error message &#8220;Gave up waiting for root device&#8221;.</p>
<p>Check if this lets you continue with the boot sequence:</p>
<pre class="code">dmraid -ay
exit</pre>
<p><span id="more-55"></span>if it does, you&#8217;ve hit the jackpot.</p>
<p>edit your /usr/share/initramfs-tools/scripts/local-top/dmraid to look like this:</p>
<pre class="code">#!/bin/sh

PREREQ="udev"

prereqs()
{
echo "$PREREQ"
}

case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac

/sbin/udevadm settle --timeout=30
modprobe -Q dm-mod
modprobe -Q dm-mirror

[ -x /sbin/dmraid ] &amp;&amp; /sbin/dmraid -ay</pre>
<p>and execute as root:</p>
<pre class="code">update-initramfs -u</pre>
<p>more info:<br />
<a href="https://help.ubuntu.com/community/FakeRaidHowto">https://help.ubuntu.com/community/FakeRaidHowto</a><br />
<a href="https://bugs.launchpad.net/ubuntu/+source/dmraid/+bug/247027">https://bugs.launchpad.net/ubuntu/+source/dmraid/+bug/247027</a></p>
]]></content:encoded>
			<wfw:commentRss>http://0x45.com/2009/02/ubuntu-and-sata-fake-raid-on-a-proliant-ml320/feed/</wfw:commentRss>
		</item>
		<item>
		<title>rails + apache 2.2 on ubuntu/debian</title>
		<link>http://0x45.com/2008/11/rails-apache-22-on-ubuntu-debian/</link>
		<comments>http://0x45.com/2008/11/rails-apache-22-on-ubuntu-debian/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 10:21:45 +0000</pubDate>
		<dc:creator>jc</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[debian]]></category>

		<category><![CDATA[passenger]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://0x45.com/?p=43</guid>
		<description><![CDATA[Rails is sort of the flavor of the moment in rapid development frameworks, a well deserved status. Neat looking, versatile, and easy to learn (at least the basics ;P), something you should try at least once.
One of my prospect customers asked me if I could set up a RoR capable server for him, after some [...]]]></description>
			<content:encoded><![CDATA[<p>Rails is sort of the flavor of the moment in rapid development frameworks, a well deserved status. Neat looking, versatile, and easy to learn (at least the basics ;P), something you should try at least once.</p>
<p>One of my prospect customers asked me if I could set up a RoR capable server for him, after some research this is what I came up with.</p>
<p>My distro of choice is ubuntu/debian, mainly cause that&#8217;s what I use to run this server.</p>
<p>First you need to install all the ruby goodies.<br />
<span id="more-43"></span></p>
<pre class="code">
sudo apt-get install ruby rdoc irb libyaml-ruby libzlib-ruby \
 ri libopenssl-ruby
</pre>
<p>Ruby has its own package manager, which tends to work better than apt-get dependency wise. It&#8217;s called RubyGems, and you can grab it at <a href="http://rubyforge.org" target="_blank">rubyforge.org</a>.</p>
<pre class="code">wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
tar zxvf rubygems-1.3.1.tgz
cd rubygems-1.3.1
sudo ruby setup.rb</pre>
<p>after it&#8217;s installed, you want to create a link to your executable and install rails using the gem tool.</p>
<pre class="code">sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
sudo gem update --system
sudo gem install rails</pre>
<p>Now you need to make a decision, mongrel or apache as the web server. I chose to stick with apache due to personal preference (more homogeneous environment to administer).</p>
<pre class="code">
sudo gem install passenger
sudo apt-get install apache2 apache2-prefork-dev
sudo passenger-install-apache2-module
</pre>
<p>add this to your apache config (your versions may change, just grab the output from the passenger installer you&#8217;ve just executed).</p>
<pre class="code">
   LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.0.3/ext/apache2/mod_passenger.so
   PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.0.3
   PassengerRuby /usr/bin/ruby1.8
</pre>
<p>and you&#8217;re good to go, don&#8217;t need to do any extra configuring, just your every day apache vhost mumbo jumbo.</p>
<p>However if you wanted to install mongrel instead:</p>
<pre class="code">
sudo apt-get install build-essential ruby1.8-dev
sudo gem install mongrel
</pre>
<p>How well mongrel works, and what config does it need, I don&#8217;t know.</p>
<p>You will need some sort of database, SQLite or MySQL are good choices depending on the size of your project. SQLite is more of a get-me-started-quick-i-don&#8217;t-care-about-all-the-database-nonsense database, while MySQL will let you scale better, adapt and offer you different storage engines depending on your needs (transactional, clustered, memory only, archive, etc).</p>
]]></content:encoded>
			<wfw:commentRss>http://0x45.com/2008/11/rails-apache-22-on-ubuntu-debian/feed/</wfw:commentRss>
		</item>
		<item>
		<title>automated rss torrent downloads with a ReadyNAS</title>
		<link>http://0x45.com/2008/11/automated-rss-torrent-downloads-with-a-readynas/</link>
		<comments>http://0x45.com/2008/11/automated-rss-torrent-downloads-with-a-readynas/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 10:07:46 +0000</pubDate>
		<dc:creator>jc</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://0x45.com/wordpress/?p=5</guid>
		<description><![CDATA[Or any linux, for that matter.
I&#8217;ve owned a ReadyNAS NV for quite a while now, I&#8217;ve always thought it was a great product.
After they allowed ssh access to the box (with raidiator 4.0) they made it even better. Low power consumption, debian linux, and a metric ton of diskspace make it a really hackable device.
It [...]]]></description>
			<content:encoded><![CDATA[<p>Or any linux, for that matter.</p>
<p>I&#8217;ve owned a ReadyNAS NV for quite a while now, I&#8217;ve always thought it was a great product.</p>
<p>After they allowed ssh access to the box (with raidiator 4.0) they made it even better. Low power consumption, debian linux, and a metric ton of diskspace make it a really hackable device.</p>
<p>It has a bittorrent client addon available, the problem is that it is only accessible via an http interface, and cannot import torrents automagically from a specified location like a drop-in folder or an rss feed, unlike some of my favorite torrent clients.</p>
<p>I did a bit of reading and put together a few pieces of script-fu that already existed on the internet.<span id="more-5"></span></p>
<h3>Auto importing torrents from drop-in folder</h3>
<p>First piece to the puzzle is chirpa&#8217;s auto-import script as it appeared in the readynas forums, with a tiny modification to fix the whitespace problem with torrent names.</p>
<p>You can see the original thread here:</p>
<p><a title="http://www.readynas.com/forum/viewtopic.php?f=35&amp;t=19126" href="http://www.readynas.com/forum/viewtopic.php?f=35&amp;t=19126" target="_blank">http://www.readynas.com/forum/viewtopic.php?f=35&amp;t=19126</a></p>
<pre class="code">#!/bin/sh
#     What: Import .torrents into the NETGEAR ReadyNAS BitTorrent
#              Download Manager
#      Who: Quickly slapped together by chirpa (readynas.com/forum)
#    Usage: Crontab it and walk away.
# Requires: Curl (maybe I'll make it work with Wget at some point)
#  Version: 0.2a
#     Todo: Check for returned status: apiTorrentAddFinishedOk /
#           apiTorrentAddFailed

INCOMING_DIR=/c/torrent
DONE_DIR=/c/torrent/done
BTURL="http://localhost:8080/api/torrent-add?start=yes"
ORIG_IFS=$IFS
IFS=$'\n'
cd $INCOMING_DIR
for f in `ls -1 *.torrent 2&gt;/dev/null`
do
echo Loading file: $f
curl -s -F fileEl=@$f $BTURL &gt;/dev/null
mv $f $DONE_DIR
done
IFS=$ORIG_IFS</pre>
<p>You can name this file &#8220;import_torrents&#8221; and run it every N minutes, adding it to your crontab. I run mine every 5 minutes.</p>
<h3>Auto downloading torrents from an RSS feed</h3>
<p>Lets suppose we want to download torrents from a mininova.org feed, this script coded by Abhi Yerra will get you started.</p>
<p>Note you will need to install both the python and python-feedparser packages via apt-get and also, you will need to modify DownloadPath, DownloadLog and FeedUrl to fit your needs.</p>
<pre class="code">#!/usr/bin/python
import feedparser
import urllib2

DownloadPath = '/c/torrent/'
DownloadLog = '/c/torrent/.tvdownloads'
FeedUrl = 'http://www.mininova.org/rss.xml?cat=6'

def is_downloaded(link):
        return link in open(DownloadLog, 'r+').read()

def write_log(link):
        open(DownloadLog, 'a+').write('%s\n' % link)

def get_tvtorrents():
        parser = feedparser.parse(FeedUrl)
        for item in parser['items']:
                if not is_downloaded(item['link']):
                        torrentfile = DownloadPath + item['title'].replace(' ', '_') + '.torrent'
                        torrentdata = urllib2.urlopen(item['link']).read()
                        print "Writing to: %s" % torrentfile
                        open(torrentfile, 'wb').write(torrentdata)
                        write_log(item['link'])

if __name__=='__main__':
    get_tvtorrents()</pre>
<p>Crontab it, every 10 minutes or so, and you&#8217;re dandy.</p>
<p>You can find the original script here:</p>
<p><a title="http://abhiyerra.wordpress.com/2007/02/17/python-vs-ruby-for-a-simple-script/" href="http://abhiyerra.wordpress.com/2007/02/17/python-vs-ruby-for-a-simple-script/" target="_blank">http://abhiyerra.wordpress.com/2007/02/17/python-vs-ruby-for-a-simple-script/</a></p>
<p>You may or may not know about <a title="pipes" href="http://pipes.yahoo.com/pipes/search?r=source:mininova.org" target="_blank">yahoo pipes</a>, which is an awesome tool for processing all sorts of information from the interweb, especially rss feeds although it will work with other formats too. The posibilities are virtually limitless.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://0x45.com/2008/11/automated-rss-torrent-downloads-with-a-readynas/feed/</wfw:commentRss>
		</item>
		<item>
		<title>back in black</title>
		<link>http://0x45.com/2008/11/back-in-black/</link>
		<comments>http://0x45.com/2008/11/back-in-black/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 15:20:09 +0000</pubDate>
		<dc:creator>jc</dc:creator>
		
		<category><![CDATA[0x45]]></category>

		<category><![CDATA[theplanetsucks]]></category>

		<guid isPermaLink="false">http://0x45.com/wordpress/?p=3</guid>
		<description><![CDATA[oh well, here comes v2.0, after our old server got wiped out and all that stuff I just want to forget about right  now.
more and better to follow soon.
]]></description>
			<content:encoded><![CDATA[<p>oh well, here comes v2.0, after our old server got wiped out and all that stuff I just want to forget about right  now.</p>
<p>more and better to follow soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://0x45.com/2008/11/back-in-black/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
