Andrew's blog (Entries tagged as linux)https://cerberus.etc.gen.nz/
This is a blog, it is it is.enSerendipity 2.1.4 - http://www.s9y.org/Thu, 01 Jan 1970 00:00:00 GMThttps://cerberus.etc.gen.nz/templates/2k11/img/s9y_banner_small.pngRSS: Andrew's blog - This is a blog, it is it is.https://cerberus.etc.gen.nz/
10021Laptops and networkshttps://cerberus.etc.gen.nz/archives/124-Laptops-and-networks.html
catalystfamilyhttps://cerberus.etc.gen.nz/archives/124-Laptops-and-networks.html#commentshttps://cerberus.etc.gen.nz/wfwcomment.php?cid=1240https://cerberus.etc.gen.nz/rss.php?version=2.0&type=comments&cid=124andrew@etc.gen.nz (Andrew Ruthven)
Back in the old days, we had workstations. And only workstations. They lived on a network, and having them work in that network was simple. Printers just worked (thank you printcap), network shares just worked (thank you NFS) and life was good.<br />
<br />
Then along came laptops. We wanted to be more mobile, using our laptops on different networks or even without a network! No one wanted hardcoded printers anymore, or network shares defined in /etc/fstab. Using an Automounter was an option, but if you were on a different network then having the Automounter around would stall tools like nautilus and file indexers etc.<br />
<br />
So we need something which can start up relevant services when you connect to a network, and then stop them when you leave that network.<br />
<br />
To support this, a few years ago I wrote a NetworkManager dispatcher.d script to do just that. When you connect to a specific network (using the NetworkManager UUID or a specific gateway MAC) or a VPN connection then autofs is started, users GTK bookmarks have any bookmarks for their Network shares added and CUPS is restarted.<br />
<br />
When the connection goes away, then autofs is stopped, any GTK bookmarks for the Network shares are removed and any mounts for the Network shares are lazily unmounted.<br />
<br />
I'm not sure if this will of use to anyone else, but if it is I'd love to hear from you. You can <a onclick="_gaq.push(['_trackPageview', '/extlink/git.etc.gen.nz/cgi-bin/gitweb.cgi?p=laptop-tools.git']);" href="http://git.etc.gen.nz/cgi-bin/gitweb.cgi?p=laptop-tools.git" title="gitweb">browse the code</a> or <a onclick="_gaq.push(['_trackPageview', '/extlink/git.etc.gen.nz/laptop-tools.git']);" href="http://git.etc.gen.nz/laptop-tools.git" title="clone">clone the repo</a>.<br />
<br />
Included are sample autofs config files, the dispatcher, and the tools for managing the GTK bookmark files.
Tue, 28 Jan 2014 22:32:36 +1300https://cerberus.etc.gen.nz/archives/124-guid.htmlcatalystfamilygeeklaptoplinuxLCA2010 - Call for Papers - closing soon!https://cerberus.etc.gen.nz/archives/102-LCA2010-Call-for-Papers-closing-soon!.html
catalystfamilyhttps://cerberus.etc.gen.nz/archives/102-LCA2010-Call-for-Papers-closing-soon!.html#commentshttps://cerberus.etc.gen.nz/wfwcomment.php?cid=1020https://cerberus.etc.gen.nz/rss.php?version=2.0&type=comments&cid=102andrew@etc.gen.nz (Andrew Ruthven)
Wow, the linux.conf.au 2010 team have had a an awesome response to our <a href="http://blog.etc.gen.nz/index.php?/archives/100-LCA2010-Call-for-Miniconfs-are-now-open!.html">Call for Miniconfs</a> with over 32 amazing submissions. But the work isn't over yet!<br />
<br />
Our <a onclick="_gaq.push(['_trackPageview', '/extlink/www.lca2010.org.nz/media/news/51']);" href="http://www.lca2010.org.nz/media/news/51">Call for Papers</a> is still open, but closes on Friday. That's right, Friday. If you'd like the opportunity to speak at one of the best FOSS conferences in the world, this is your chance, we want to hear from you!<br />
<br />
For more information about submitting a paper, have a look at the <a onclick="_gaq.push(['_trackPageview', '/extlink/www.lca2010.org.nz/programme/papers_info']);" href="http://www.lca2010.org.nz/programme/papers_info">Papers Info</a> page on our website.
Wed, 22 Jul 2009 09:21:42 +1200https://cerberus.etc.gen.nz/archives/102-guid.htmlcatalystfamilygeeklca2010linuxlinux.conf.auMythTV Status in your MOTD (and email) - Version 0.6.1https://cerberus.etc.gen.nz/archives/77-MythTV-Status-in-your-MOTD-and-email-Version-0.6.1.html
catalysthttps://cerberus.etc.gen.nz/archives/77-MythTV-Status-in-your-MOTD-and-email-Version-0.6.1.html#commentshttps://cerberus.etc.gen.nz/wfwcomment.php?cid=770https://cerberus.etc.gen.nz/rss.php?version=2.0&type=comments&cid=77andrew@etc.gen.nz (Andrew Ruthven)
I'm pleased to announce a new version of my little script - 0.6.1.
<p>
<br />
Notable new features:
<br />
<ul>
<li> Details on disk space are reported, and individual storage groups[0];
<li> If there isn't enough program guide data, a warning is shown;
<li> The <tt>--email-only-on-conflict</tt> option has been extended to mean
"Only on alert" which now includes both the previous points
(this means, you'll only be emailled if there is something which
needs your attention);
<li> For each recording (scheduled, current and conflict) show the channel
name it is related to;
<li> We do a little bit of rinsing on the XML data now to remove some
invalid unicode characters that occasionally appear;
<li> Suppress some warnings if the user doesn't have access to MySQL and
handle some other error conditions in a nicer manner.
</ul>
If you install the .deb, then the MOTD is updated automatically and the
email will be sent daily if there are conflicts (and you've set some
email addresses).
<p>
<br />
As usual, you can check the <a onclick="_gaq.push(['_trackPageview', '/extlink/www.etc.gen.nz/projects/mythtv/mythtv-status.html']);" href="http://www.etc.gen.nz/projects/mythtv/mythtv-status.html">project page</a>.
<p><br />
[0] To get the details on the individual storage groups you need to
apply a couple of patches to MythTV. Please see the FAQ in the tarball
or for Debian type boxes, /usr/share/doc/mythtv-status/FAQ .
<p>
<b>Update:</b> I've disabled comments for now as I'm tired of all the spam.
Fri, 14 Dec 2007 08:19:53 +1300https://cerberus.etc.gen.nz/archives/77-guid.htmlcatalystgeeklinuxmythtvmythtv-statusperlsoftwareMythTV Status in your MOTD (and email) - Version 0.5.1https://cerberus.etc.gen.nz/archives/75-MythTV-Status-in-your-MOTD-and-email-Version-0.5.1.html
catalysthttps://cerberus.etc.gen.nz/archives/75-MythTV-Status-in-your-MOTD-and-email-Version-0.5.1.html#commentshttps://cerberus.etc.gen.nz/wfwcomment.php?cid=750https://cerberus.etc.gen.nz/rss.php?version=2.0&type=comments&cid=75andrew@etc.gen.nz (Andrew Ruthven)
I'm pleased to announce a new version of my little script - <strike>0.5</strike> 0.5.1.
<p>
<br />
Notable new features (from the shiny new ChangeLog):
<br />
<ul>
<li> Add support for printing colour in the encoder status display.
<li> Show any schedule conflicts, or if the MythTV Perl API isn't
usable, a warning is displayed.
<li> Display the amount of time until the next recording.
<li> Add --version &amp; --help options.
<li> Allow suppressing blocks of output.
<li> The report can be sent via email with the subject set correctly.
With an option to only send out email if schedule conflicts are
detected.
</ul>
If you install the .deb, then the MOTD is updated automatically and the
email will be sent daily if there are conflicts (and you've set some
email addresses).
<p>
<br />
As usual, you can check the <a onclick="_gaq.push(['_trackPageview', '/extlink/www.etc.gen.nz/projects/mythtv/mythtv-status.html']);" href="http://www.etc.gen.nz/projects/mythtv/mythtv-status.html">project page</a>.
<p><br />
<b>Update:</b> I've released 0.5.1 which should make the colour look good on non-black backgrounds as well.
Fri, 23 Nov 2007 08:28:12 +1300https://cerberus.etc.gen.nz/archives/75-guid.htmlcatalystgeeklinuxmythtvmythtv-statusperlsoftwareMythTV Status in your MOTDhttps://cerberus.etc.gen.nz/archives/74-MythTV-Status-in-your-MOTD.html
catalysthttps://cerberus.etc.gen.nz/archives/74-MythTV-Status-in-your-MOTD.html#commentshttps://cerberus.etc.gen.nz/wfwcomment.php?cid=740https://cerberus.etc.gen.nz/rss.php?version=2.0&type=comments&cid=74andrew@etc.gen.nz (Andrew Ruthven)
The other day I was recompiling some kernels during the day on our
<a onclick="_gaq.push(['_trackPageview', '/extlink/www.mythtv.org']);" href="http://www.mythtv.org">MythTV</a> backend, which at the time happened to be recording my wifes
favourite program (Grey's Anatomy, we discovered it part way through the
season, so the repeats are good). It turns out the compilation caused
some issues with the recording (which reduced the WAF).
<p>
<br />
So to increase the WAF, I'm making sure this doesn't happen again. I've
written a script that spits out the MythTV status which is then
displayed in the MOTD. It is available <a onclick="_gaq.push(['_trackPageview', '/extlink/www.etc.gen.nz/projects/mythtv/mythtv-status.html']);" href="http://www.etc.gen.nz/projects/mythtv/mythtv-status.html">over here</a>.
<p>
<br />
I've found this is a pretty effective way of letting me know of any
upcoming recordings and what is going to be happening on the system in
the next little while. It is a whole lot easier than using the status
page on MythWeb.
<p>
<br />
Sample output:
<pre>
MythTV status for localhost
===========================
Status: Mon Oct 15 2007, 8:41 AM
Encoders:
cerberus (9) - Idle
cerberus (12) - Idle
Scheduled Recordings:
2007-10-15 13:30:00 - Grey's Anatomy
2007-10-15 18:00:00 - 3 News
2007-10-15 20:30:00 - Mythbusters
2007-10-15 22:00:00 - Flight Of The Conchords
2007-10-16 13:30:00 - Grey's Anatomy
2007-10-16 18:00:00 - 3 News
</pre>
I run Debian, so there is a .deb. For those not running Debian there is
a tarball (but the MOTD updating glue is Debian specific at the moment).
For those interested in hacking there is a git repository.
<p>
<br />
Hopefully I'm not the only one that finds this useful.
Fri, 16 Nov 2007 09:24:31 +1300https://cerberus.etc.gen.nz/archives/74-guid.htmlcatalystgeeklinuxmythtvmythtv-statusperlsoftwareIPv6 Firewallinghttps://cerberus.etc.gen.nz/archives/43-IPv6-Firewalling.html
catalysthttps://cerberus.etc.gen.nz/archives/43-IPv6-Firewalling.html#commentshttps://cerberus.etc.gen.nz/wfwcomment.php?cid=430https://cerberus.etc.gen.nz/rss.php?version=2.0&type=comments&cid=43andrew@etc.gen.nz (Andrew Ruthven)
Firewalling IPv6 on Linux seems to be a vaguely documented topic, and most of that documentation seems to be out of date as it is a fast moving target. I've spent a bit of time over the last couple of days working on improving my firewalling situation and thought I should write up what I've found.<br />
<br />
After a bit of digging I found that while IPv6 connection tracking was merged in 2.6.16, the configuration options are somewhat hidden. Up until yesterday I was running 2.6.19.x on my firewall and I discovered that while ip6tables allowed me to configure a stateful firewall, it wasn't actually doing anything!<br />
<br />
I looked around for the required nf_conntrack_ipv6 module and couldn't find it. I looked in my running kernels config and couldn't find it. In fact I couldn't find any option for enabling IPv6 connection tracking at all. After some digging (grep'ing the Kconfig files helps) I found that I needed to change over to the new (experimental) Layer 3 Independent Connection tracking support.<br />
<br />
The catch here is that if you have the old school Connection tracking (CONFIG_IP_NF_CONNTRACK) enabled you'll never see the new independent method (CONFIG_NF_CONNTRACK) in menuconfig. Which is why I'd never seen it before. So I disabled CONFIG_IP_NF_CONNTRACK (in IP: Netfilter Configuration), enabled (the now visible) CONFIG_NF_CONNTRACK (in Core Netfilter Configuration) went into both the IP and IPv6 Netfilter Configuration menus and selected support for the connection tracking option.<br />
<br />
Compiled, installed and rebooted. Suddenly I had IPv6 connection tracking working. w00t! But no IPv4 NAT. Damn. It turns out that IPv4 NAT support was only ported to the new Layer 3 Independent Connection stuff in 2.6.20.<br />
<br />
So I downloaded 2.6.20.3, jumped into the IP: Netfilter Configuration menu and found "Full NAT". That's what I want. Compiled, installed and rebooted.<br />
<br />
Now I have my old IPv4 NAT working, <b>and</b> a full stateful IPv6 firewall (with no NAT!).<br />
<br />
Oh, if you are using IPv6 stateful firewalling with Linux then you want to upgrade to 2.6.20.3, it fixes an issue with incorrectly classifying IPv6 fragments as ESTABLISHED and letting them through. Oops. Also, 2.6.20 moves the config options around again...
Thu, 15 Mar 2007 11:02:10 +1300https://cerberus.etc.gen.nz/archives/43-guid.htmlipv6kernellinuxsoftware