<?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>Raskas' blog &#187; Linux SysAdmin</title>
	<atom:link href="http://www.raskas.be/blog/category/linux-sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.raskas.be/blog</link>
	<description>Everything is possible... You only have to find out how.</description>
	<lastBuildDate>Sat, 05 Dec 2009 14:18:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Apt-rpm dependency problem</title>
		<link>http://www.raskas.be/blog/2009/08/12/apt-rpm-dependency-problem/</link>
		<comments>http://www.raskas.be/blog/2009/08/12/apt-rpm-dependency-problem/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 15:30:08 +0000</pubDate>
		<dc:creator>Johan Huysmans</dc:creator>
				<category><![CDATA[Linux SysAdmin]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.raskas.be/blog/?p=98</guid>
		<description><![CDATA[When installing some rpm&#8217;s on a CentOS5 system I encountered a dependency problem.
Apt told me that it depends on a specific file which isn&#8217;t provided by any package in the repository. After some investigation I noticed that the rpm WAS available in the repository, and that yum correctly found that package.
The problem was that the [...]]]></description>
			<content:encoded><![CDATA[<p>When installing some rpm&#8217;s on a CentOS5 system I encountered a dependency problem.</p>
<p>Apt told me that it depends on a specific file which isn&#8217;t provided by any package in the repository. After some investigation I noticed that the rpm WAS available in the repository, and that yum correctly found that package.</p>
<p>The problem was that the specific file needed by the package was a symlink provided by the other package. The symlink file is known by the rpm (rpm -ql /path/to/file gives the rpm) but isn&#8217;t know by apt.</p>
<p>Instead of running genbasedir with the location of the repository as only argument, add the &#8211;bloat argument.<br />
<code><br />
genbasedir --bloat /path/to/repository<br />
</code><br />
This will solve the problem!</p>
<p><br/></p>
<p>I noticed this problem during the installation of redhat-lsb on a very minimal CentOS5 system. redhat-lsb requires 2 files (which are symlinks), these files are provided by&#8230; redhat-lsb itselve&#8230;</p>
<p>If you didn&#8217;t use the &#8211;bloat argument the redhat-lsb package couldn&#8217;t be installed with apt, it could be installed with yum or rpm.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raskas.be/blog/2009/08/12/apt-rpm-dependency-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>syslog-ng bug</title>
		<link>http://www.raskas.be/blog/2009/03/19/syslog-ng-bug/</link>
		<comments>http://www.raskas.be/blog/2009/03/19/syslog-ng-bug/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 11:49:57 +0000</pubDate>
		<dc:creator>Johan Huysmans</dc:creator>
				<category><![CDATA[Linux SysAdmin]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[syslog-ng]]></category>

		<guid isPermaLink="false">http://www.raskas.be/blog/?p=91</guid>
		<description><![CDATA[Today I stumpled upon a syslog-ng bug.
We are using syslog-ng-2.1.3 on one of our machines which sends part of his messages over UDP to 2 syslog machines. On some days we noticed that syslog-ng and some other services are stopped. Restarting syslog-ng showed us that they were killed by the OOM-killer.
I directly suspected the java [...]]]></description>
			<content:encoded><![CDATA[<p>Today I stumpled upon a syslog-ng bug.</p>
<p>We are using syslog-ng-2.1.3 on one of our machines which sends part of his messages over UDP to 2 syslog machines. On some days we noticed that syslog-ng and some other services are stopped. Restarting syslog-ng showed us that they were killed by the OOM-killer.<br />
I directly suspected the java process that was also running on that machine.</p>
<p>After googling around I found this syslog-ng bug: <a href="https://bugzilla.balabit.com/show_bug.cgi?id=39" target="_blank">https://bugzilla.balabit.com/show_bug.cgi?id=39</a></p>
<p>And indeed, we had the same problem. This is how I could reproduce it:</p>
<ul>
<li>Stop the syslog service (on the host which receives the messages)</li>
<li>Restart syslog-ng</li>
<li>Watch the memory usage of syslog-ng growing until it starts swapping and triggers the OOM-killer</li>
</ul>
<p>Luckily this bug is already solved, and by upgrading to syslog-ng-2.1.4 the problem is fixed.</p>
<p>CentOS doesn&#8217;t provide the rpm packages of syslog-ng, <a href="http://www.silfreed.net/" target="_blank">silfreed.net</a> does: <a href="http://www.silfreed.net/download/repo/" target="_blank">http://www.silfreed.net/download/repo/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.raskas.be/blog/2009/03/19/syslog-ng-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Input/Output redirection, appending</title>
		<link>http://www.raskas.be/blog/2008/08/15/inputoutput-redirection-appending/</link>
		<comments>http://www.raskas.be/blog/2008/08/15/inputoutput-redirection-appending/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 13:58:18 +0000</pubDate>
		<dc:creator>Johan Huysmans</dc:creator>
				<category><![CDATA[Linux SysAdmin]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bug]]></category>

		<guid isPermaLink="false">http://www.raskas.be/blog/?p=85</guid>
		<description><![CDATA[In a previous post I wrote about output redirection of STDOUT, STDERR and both to a file. Off course you can do the same to append to an existing file:

ls &#62;&#62; output.txt
ls 2&#62;&#62; error.txt

If you try this with &#38;&#62;&#62; you will receive a bash syntax error:

ls &#38;&#62;&#62; output_and_error.txt
bash: syntax error near unexpected token `&#62;'

How come [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.raskas.be/blog/2007/02/26/inputoutput-redirection/" target="_blank">a previous post</a> I wrote about output redirection of STDOUT, STDERR and both to a file. Off course you can do the same to append to an existing file:<br />
<code><br />
ls &gt;&gt; output.txt<br />
ls 2&gt;&gt; error.txt<br />
</code><br />
If you try this with &amp;&gt;&gt; you will receive a bash syntax error:<br />
<code><br />
ls &amp;&gt;&gt; output_and_error.txt<br />
bash: syntax error near unexpected token `&gt;'<br />
</code></p>
<p>How come appending of both STDOUT and STDERR to a file does not work this way? Is this a bug in bash?<br />
Yes, I know I can use the following, but I prefer the &amp;&gt;&gt;:<code><br />
ls 1>> output_and_error.txt 2>&#038;1<br />
</code></p>
<p>And how come I can&#8217;t find a bugzilla for bash?<br />
Yes, I know I can use the command bashbug to send a mail to a mailinglist, but this is not the same as bugzilla.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raskas.be/blog/2008/08/15/inputoutput-redirection-appending/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Ubuntu</title>
		<link>http://www.raskas.be/blog/2008/07/18/installing-ubuntu/</link>
		<comments>http://www.raskas.be/blog/2008/07/18/installing-ubuntu/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 19:44:15 +0000</pubDate>
		<dc:creator>Johan Huysmans</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux SysAdmin]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.raskas.be/blog/?p=84</guid>
		<description><![CDATA[This week I reinstalled one of my Fedora machines with an Ubuntu 8.04. Not that I don&#8217;t like Fedora anymore but just because I want something new.
One of the big annoyancies I noticed during the installation was that it didn&#8217;t recognize my lvm partitions. And I really need that, as my home and root partition [...]]]></description>
			<content:encoded><![CDATA[<p>This week I reinstalled one of my Fedora machines with an Ubuntu 8.04. Not that I don&#8217;t like Fedora anymore but just because I want something new.</p>
<p>One of the big annoyancies I noticed during the installation was that it didn&#8217;t recognize my lvm partitions. And I really need that, as my home and root partition are on lvm and I didn&#8217;t want to repartition my complete drive.</p>
<p>Luckily I found some explanation for lvm support during the installation. This is the summary of the actions you need to perform.</p>
<p>Become the root user:<br />
<strong>ubuntu@ubuntu:~$ sudo -i</strong></p>
<p>Load the dm-mod module:<strong><br />
root@ubuntu:~# modprobe dm-mod</strong></p>
<p>Install the lvm2 package on the live system:<strong><br />
root@ubuntu:~# apt-get install lvm2</strong></p>
<p>Activate the logical volumes of your volumegroup<strong><br />
root@ubuntu:~# lvchange -a y &lt;volgroup name&gt;</strong></p>
<p>At this moment you can perform a normal installation, your existing logical volumes will be recognized and can be used during installation.<br />
After the complete installation process you have to install lvm support for you new installation.</p>
<p>Mount the partitions of your new installation:<br />
<strong>root@ubuntu:~# mount /dev/volgroup/root /mnt</strong><br />
<strong>root@ubuntu:~# mount /dev/sda1 /mnt/boot<br />
</strong><strong>root@ubuntu:~# mount -o bind /dev /mnt/dev</strong></p>
<p>Chroot into your new installation:<br />
<strong>root@ubuntu:~# chroot /mnt</strong></p>
<p>Install the lvm2 package:<br />
<strong>root@ubuntu:~# apt-get install lvm2</strong></p>
<p>You can now exit your chroot environment and reboot your machine. If everything is OK, you can boot your fresh ubuntu installation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raskas.be/blog/2008/07/18/installing-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Shell History Meme</title>
		<link>http://www.raskas.be/blog/2008/04/10/shell-history-meme/</link>
		<comments>http://www.raskas.be/blog/2008/04/10/shell-history-meme/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 07:28:14 +0000</pubDate>
		<dc:creator>Johan Huysmans</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux SysAdmin]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[top 10]]></category>

		<guid isPermaLink="false">http://www.raskas.be/blog/?p=82</guid>
		<description><![CDATA[There is a Shell history meme going on on planet Fedora; Let&#8217;s join.
[johan@laptop ~]$ history&#124;awk &#39;{a[$2]++ } END{for(i in a){print a[i] &#34; &#34; i}}&#39;&#124;sort -nr&#124;head
201 ls
108 ssh
108 cd
98 sh
81 su
29 vi
24 rpm
24 ping
23 rm
20 mv
[johan@workstation ~]$ history&#124;awk &#39;{a[$2]++ } END{for(i in a){print a[i] &#34; &#34; i}}&#39;&#124;sort -nr&#124;head
149 ls
128 cd
125 cvs
93 diff
71 echo
54 ssh
45 for
28 mkdir
26 [...]]]></description>
			<content:encoded><![CDATA[<p>There is a Shell history meme going on on <a href="http://planet.fedoraproject.org/" target="_blank">planet Fedora</a>; Let&#8217;s join.</p>
<p>[johan@laptop ~]$ history|awk &#39;{a[$2]++ } END{for(i in a){print a[i] &#34; &#34; i}}&#39;|sort -nr|head<br />
201 ls<br />
108 ssh<br />
108 cd<br />
98 sh<br />
81 su<br />
29 vi<br />
24 rpm<br />
24 ping<br />
23 rm<br />
20 mv</p>
<p>[johan@workstation ~]$ history|awk &#39;{a[$2]++ } END{for(i in a){print a[i] &#34; &#34; i}}&#39;|sort -nr|head<br />
149 ls<br />
128 cd<br />
125 cvs<br />
93 diff<br />
71 echo<br />
54 ssh<br />
45 for<br />
28 mkdir<br />
26 md5sum<br />
24 reset</p>
<p>My previous post of my <a href="http://www.raskas.be/blog/2006/09/25/top-10-used-commands/" target="_blank">Top 10 used commands</a> was more than 1 year ago.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raskas.be/blog/2008/04/10/shell-history-meme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL MYD and TMD files</title>
		<link>http://www.raskas.be/blog/2008/04/08/mysql-myd-and-tmd-files/</link>
		<comments>http://www.raskas.be/blog/2008/04/08/mysql-myd-and-tmd-files/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 12:32:27 +0000</pubDate>
		<dc:creator>Johan Huysmans</dc:creator>
				<category><![CDATA[Backup]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[fsck]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.raskas.be/blog/?p=81</guid>
		<description><![CDATA[I just recovered from a database issue.
While running a mysqldump of my databases I received an error. Running a check on that specific database told me that the comments.MYD file was not found.
Investigating on the system showed me that due to an error the filesystem containing /var/lib/mysql was mounted read-only. Running a fsck on that [...]]]></description>
			<content:encoded><![CDATA[<p>I just recovered from a database issue.</p>
<p>While running a mysqldump of my databases I received an error. Running a check on that specific database told me that the comments.MYD file was not found.</p>
<p>Investigating on the system showed me that due to an error the filesystem containing /var/lib/mysql was mounted read-only. Running a fsck on that specific filesystem solved that error but didn&#8217;t fix my corrupted table.</p>
<p>phpMyAdmin showed that the table was in use and while performing a check or repair it complained about the missing file.</p>
<p>The comments.MYD file was indeed missing, but there was a comments.TMD file, which wasn&#8217;t there for all the other tables.</p>
<p>Moving this TMD file to MYD solved the issue. I could repair the table and the check is again successful.</p>
<p>During this problem wordpress didn&#8217;t complain but it just didn&#8217;t show my comments. But I have no clue what caused this problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raskas.be/blog/2008/04/08/mysql-myd-and-tmd-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Xen for High Availability Clusters</title>
		<link>http://www.raskas.be/blog/2008/02/06/using-xen-for-high-availability-clusters/</link>
		<comments>http://www.raskas.be/blog/2008/02/06/using-xen-for-high-availability-clusters/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 08:43:12 +0000</pubDate>
		<dc:creator>Johan Huysmans</dc:creator>
				<category><![CDATA[Linux SysAdmin]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://www.raskas.be/blog/2008/02/06/using-xen-for-high-availability-clusters/</guid>
		<description><![CDATA[Yesterday evening O&#8217;Reilly ONLamp.com published &#8220;Using Xen for High Availability Clusters&#8220;.
This article is written by my colleague, Kris Buytaert, and me and describes the setup of the clustering of the virtual gateways at Newtec.
It explains the networking in a xen dom0 and how to block all virtual machines from the network. It also explains how [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.oreillynet.com/standard-tiles/onlamp/111-horse_app.jpg" alt="ONLAMP" align="right" height="91" width="111" />Yesterday evening <a href="http://www.onlamp.com/" target="_blank">O&#8217;Reilly ONLamp.com</a> published &#8220;<a href="http://www.onlamp.com/pub/a/onlamp/2008/02/05/using-xen-for-high-availabilty-clusters.html" target="_blank">Using Xen for High Availability Clusters</a>&#8220;.</p>
<p>This article is written by my colleague, <a href="http://www.krisbuytaert.be/blog/" target="_blank">Kris Buytaert</a>, and me and describes the setup of the clustering of the virtual gateways at <a href="http://www.newtec.eu/" target="_blank">Newtec</a>.<br />
It explains the networking in a xen dom0 and how to block all virtual machines from the network. It also explains how you can integrate this with linux-ha.</p>
<p>This is my first article on O&#8217;Reilly, this means that I now have a profile on <a href="http://www.oreillynet.com" target="_blank">O&#8217;Reillynet</a>, you can check it out here: <a href="http://www.oreillynet.com" target="_blank"></a><a href="http://www.oreillynet.com/pub/au/3323" target="_blank">http://www.oreillynet.com/pub/au/3323.</a></p>
<p>Enjoy the reading !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raskas.be/blog/2008/02/06/using-xen-for-high-availability-clusters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3ware module refuses to load with xen kernel</title>
		<link>http://www.raskas.be/blog/2008/01/17/3ware-module-refuses-to-load-with-xen-kernel/</link>
		<comments>http://www.raskas.be/blog/2008/01/17/3ware-module-refuses-to-load-with-xen-kernel/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 07:58:12 +0000</pubDate>
		<dc:creator>Johan Huysmans</dc:creator>
				<category><![CDATA[Linux SysAdmin]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://www.raskas.be/blog/2008/01/17/3ware-module-refuses-to-load-with-xen-kernel/</guid>
		<description><![CDATA[Today I encountered a problem with the 3ware module.
The fresh installed CentOs 5, on a machine with a 3ware 9500 card, booted without any problems, but this wasn&#8217;t the case when booting with the xen enabled kernel. During boot of the xen kernel, which ended in a kernel panic, it showed something about ioremap. When [...]]]></description>
			<content:encoded><![CDATA[<p>Today I encountered a problem with the 3ware module.</p>
<p>The fresh installed CentOs 5, on a machine with a 3ware 9500 card, booted without any problems, but this wasn&#8217;t the case when booting with the xen enabled kernel. During boot of the xen kernel, which ended in a kernel panic, it showed something about <em>ioremap</em>. When googling about the problem I found a <a href="http://www.mail-archive.com/linux-scsi@vger.kernel.org/msg10302.html" target="_blank">patch</a> which solved the problem.</p>
<p>Here is a step-by-step guide how I&#8217;ve applied the patch and solved the problem&#8230;<span id="more-77"></span></p>
<p>Ideal you download the src rpm of the kernel, apply the patch and rebuild the kernel. This rebuild will take some time, but you can easily download the 3ware module and rebuild only that module. Therefore I&#8217;ve used the module provided on the 3ware website.</p>
<p>1. Install the needed packages to be able to build the module</p>
<pre># yum install kernel-xen-devel gcc</pre>
<p>2.  Create a link pointing to the source directory of the kernel (This is the kernel where you want to rebuild the module for). This is not needed if you want to rebuild for the current kernel.</p>
<pre># cd /usr/src/
# ln -snf /lib/modules/2.6.18-53.1.4.el5xen/source linux</pre>
<p>3.  Download and unpack the downloaded module</p>
<pre># tar -zxvf 3w-9xxx-2.6.18kernel_9.5.0.tgz
# cd build</pre>
<p>4. Apply the patch (see http://www.mail-archive.com/linux-scsi@vger.kernel.org/msg10302.html)</p>
<p>5. Build the module</p>
<pre># make</pre>
<p>6. Overwrite the old 3ware module with the one you just have build</p>
<pre># cp 3w-9xxx.ko /lib/modules/2.6.18-53.1.4.el5xen/kernel/drivers/scsi/3w-9xxx.ko</pre>
<p>7. Rebuild the initrd</p>
<pre># mkinitrd -v -f /boot/initrd-2.6.18-53.1.4.el5xen.img 2.6.18-53.1.4.el5xen</pre>
<p>8. Reboot</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raskas.be/blog/2008/01/17/3ware-module-refuses-to-load-with-xen-kernel/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>rsync daemon init script</title>
		<link>http://www.raskas.be/blog/2007/12/21/rsync-daemon-init-script/</link>
		<comments>http://www.raskas.be/blog/2007/12/21/rsync-daemon-init-script/#comments</comments>
		<pubDate>Fri, 21 Dec 2007 20:18:25 +0000</pubDate>
		<dc:creator>Johan Huysmans</dc:creator>
				<category><![CDATA[Backup]]></category>
		<category><![CDATA[Linux SysAdmin]]></category>

		<guid isPermaLink="false">http://www.raskas.be/blog/2007/12/21/rsync-daemon-init-script/</guid>
		<description><![CDATA[Rsync, the popular file synchronization tool, can be used as a daemon. It is quite easy to start the daemon version of it, just execute:
rsync --daemon --config=/path/to/rsyncd.conf
If you want to start it at boottime you have to create an init script as it is not delivered with the rpm (or at least not with redhat/centos/fedora [...]]]></description>
			<content:encoded><![CDATA[<p>Rsync, the popular file synchronization tool, can be used as a daemon. It is quite easy to start the daemon version of it, just execute:<br />
<code>rsync --daemon --config=/path/to/rsyncd.conf</code></p>
<p>If you want to start it at boottime you have to create an init script as it is not delivered with the rpm (or at least not with redhat/centos/fedora rpms).<br />
You can search for any existing init scripts, for example systemimager-server delivers such init script, and use that script or write a simple init script yourself, using an existing script as guideline.</p>
<p>In my setup I needed 2 daemons, one running on port 873 (the default), the other one running on port 874. This is off course perfectly feasible but had some problems with the init scripts.<br />
I wanted to be able to start and stop each daemon  separately. But with the simple init script I could start both separately but when i wanted to stop one of them they are both stopped.</p>
<p>Diving into the <em>daemon</em> and <em>killproc</em> functions, which are stored in <em>/etc/rc.d/init.d/functions</em> and used by all init scripts, showed me that I have to use a combination of storing the pid file and the base filename of the init script.<br />
The pid of the rsync daemon can be stored in any file (this is handle by rsync itself), this can be configured in the rsyncd configuration with following line: <code>pid file = /var/run/rsyncd.pid</code></p>
<p>Following init script can start or stop the specific rsync daemon even if there are multiple daemons running on the system.<br />
There is only requirement for this init script, which is explicitly explained in the script, the filename of the initscript must be the basename of the pidfile. For example if your initscript is /etc/init.d/custon-rsyncd the pid must be stored in /var/run/custom-rsyncd.pid.</p>
<pre>
#! /bin/sh
#
# chkconfig:   2345 50 50
# description: The rsync daemon

# source function library
 . /etc/rc.d/init.d/functions

PROG='/usr/bin/rsync'
BASE=${0##*/}

# Adapt the --config parameter to point to your rsync daemon configuration
# The config file must contain following line:
#  pid file = /var/run/&lt;filename&gt;.pid
# Where &lt;filename&gt; is the filename of the init script (= this file)
OPTIONS="--daemon --config=/etc/rsyncd.conf"

case "$1" in
  start)
    echo -n $"Starting $BASE: "
    daemon --check $BASE $PROG $OPTIONS
    RETVAL=$?
    [ $RETVAL -eq 0 ] &amp;&amp; touch /var/lock/subsys/$BASE
    echo
    ;;
  stop)
    echo -n $"Shutting down $BASE: "
    killproc $BASE
    RETVAL=$?
    [ $RETVAL -eq 0 ] &amp;&amp; rm -f /var/lock/subsys/$BASE
    echo
    ;;
  restart|force-reload)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "Usage: $0 {start|stop|restart|force-reload}" &gt;&amp;2
    exit 1
    ;;
esac

exit 0</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.raskas.be/blog/2007/12/21/rsync-daemon-init-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bonding configuration is &#8216; specific</title>
		<link>http://www.raskas.be/blog/2007/09/19/bonding-configuration-is-specific/</link>
		<comments>http://www.raskas.be/blog/2007/09/19/bonding-configuration-is-specific/#comments</comments>
		<pubDate>Wed, 19 Sep 2007 17:36:14 +0000</pubDate>
		<dc:creator>Johan Huysmans</dc:creator>
				<category><![CDATA[Linux SysAdmin]]></category>

		<guid isPermaLink="false">http://www.raskas.be/blog/2007/09/19/bonding-configuration-is-specific/</guid>
		<description><![CDATA[I was configuring a bonding interface on one of the machines here, but i couldn&#8217;t connect to the host after a reboot or network restart.
The bond0 interface was up and running but no eth interfaces where marked as slave for that bond interface.
If I manually ran ifup eth0 the eth0 comes up and is marked [...]]]></description>
			<content:encoded><![CDATA[<p>I was configuring a bonding interface on one of the machines here, but i couldn&#8217;t connect to the host after a reboot or network restart.<br />
The bond0 interface was up and running but no eth interfaces where marked as slave for that bond interface.<br />
If I manually ran <em>ifup eth0</em> the eth0 comes up and is marked as slave of bond0 and the connection to the outside can be established.<br />
I started to debug the /etc/init.d/network script and also the ifup script. In that ifup script i noticed following lines of code:<br />
<code><br />
if [ "${TYPE}" =  "Bonding" ] || ethtool -i $DEVICE 2>/dev/null| grep -q "driver: bonding" ; then&nbsp;&nbsp;for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}" /etc/sysconfig/network-scripts/ifcfg-*` ; do<br />
&nbsp;&nbsp;&nbsp;&nbsp;/sbin/ifup ${device##*/}<br />
&nbsp;&nbsp;done<br />
fi<br />
</code></p>
<p>So it will grep for <em>MASTER=bond0</em> and not for <em>MASTER=&#8217;bond0&#8242;</em> (note the quotes around bond0).<br />
When i removed the quotes from bond0 in the ifcfg-eth0 file the network started correctly.</p>
<p>For reference, here is my config:<br />
<strong>ifcfg-bond0</strong><code><br />
DEVICE='bond0'<br />
BOOTPROTO='static'<br />
IPADDR='10.0.10.2'<br />
NETWORK='10.0.10.0'<br />
NETMASK='255.255.255.0'<br />
BROADCAST='10.0.10.255'<br />
STARTMODE='onboot'<br />
</code></p>
<p><strong>ifcfg-eth0</strong><code><br />
DEVICE='eth0'<br />
BOOTPROTO='none'<br />
ONBOOT='yes'<br />
SLAVE='yes'<br />
MASTER=bond0<br />
</code></p>
<p><strong>ifcfg-eth1</strong><code><br />
DEVICE='eth1'<br />
BOOTPROTO='none'<br />
ONBOOT='yes'<br />
SLAVE='yes'<br />
MASTER=bond0<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.raskas.be/blog/2007/09/19/bonding-configuration-is-specific/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
