NetworkManager and virtual interfaces

My wireless router is an old Linksys BEFW11S4 (801b). I wouldn’t ask for more in terms of speed, when I’m working from the laptop the bottleneck is the upstream Internet provider (cable), and if I have to transfer massive amounts of data between the laptop and the home computer, I can connect directly into the router with a wire and get 100Mbit.

But there is something my router doesn’t have: static DHCP assignment of addresses. I hate it when I’m on the laptop and I don’t know the IP address of the home computer. I could configure the IP address on the home computer statically, but since I also have to use OpenVPN I’d have to set up dnsmasq so I can get the proper DNS server when connecting to the VPN. Or I could use NetworkManager which would take care of switching the name servers for me.
One solution I found was to have the eth0 interface on the home computer be assigned by the router via DCHP, and have a virtual interface (alias) eth0:0 configured with a static address that I can ssh into.

OK, so I’ve set up the alias in /etc/sysconfig/network-scripts/ifcfg-eth0:0 (I’m not a GUI guy when it comes to configuring the networking, I prefer to go directly on the filesystem and write the file myself – nevertheless, using system-config-network would do the same thing for you).

Except that NetworkManager will not bring the interface alias up. It will bring the main interface up, but not the alias.
After digging a bit, it turns out NetworkManagerDispatcher is at fault, and this is the solution I found:

  • mkdir -p /etc/NetworkManager/dispatcher.d (on a newly installed system it was not created by default)
  • Add this eth-subinterfaces file to /etc/NetworkManager/dispatcher.d:
#!/bin/bash

iface="$1"
shift

action="$1"
shift

if [ "$iface" = "eth0" -a "$action" = "up" ]; then
/sbin/ifup eth0:0
fi
  • Make sure you chmod 0755 /etc/NetworkManager/dispatcher.d/eth-subinterfaces
  • You may or may not have to restart NetworkManagerDispatcher (I think it just worked for me):
    • /sbin/service NetworkManagerDispatcher restart
  • Click on the NetworkManager icon, disable networking and re-enable it.

At this point, ifconfig should show the interface alias.

The Battle of Wesnoth

After reading an article about Linux games I’ve found out about The Battle of Wesnoth. It was ranked as #1, with Frozen Bubble (which I played before on my Fedora system).

Being tired of chasing 3 very strange bugs I’ve been working on for the past 3 days or so, I’ve decided to package the games for Foresight. I’ve only managed to get to wesnoth. You can get it from the foresight.rpath.org@fl:1-contrib branch.

Frozen bubble has a ton of dependencies, I have to build those first.

Christmas Tree Weekend

One weekend with lots of alcohol.

First, Todd graciously threw a farewell party for him and me (mine being way overdue since I left Red Hat more than 2 months ago). I think everybody had a great time. Thanks Todd!

Then, on Saturday I went and got a Christmas tree, and we decorated it yesterday. Saturday afternoon we were invited to some friends, and that was another alcohol-laden evening.

The same friends told us about Disney on Ice. Being princess-themed, it almost meant mandatory presence. Cristian being only 2 years and 7 months old, we decided it will be only me and Ioana that would attend.

I couldn’t quite understand why the RBC center had to charge for parking when you already pay for the ticket, but then again that’s how the entertainment industry works, I guess. A bag of cotton candy was $10, just because it had a princess/prince crown with Mickey Mouse ears that couldn’t be adjusted for size – so most kids were wearing it as a neck gaiter.

The show was pretty impressive though. I’ve never seen a live performance on ice, and I was impressed with the quality of their artists – they must be competitive figure skaters turned pro. My daughter had a blast, especially when the dragon to be slain by the prince threw flames on the ice (more alcohol, I suppose – my weekend’s theme).

They even had miniature fireworks at the end.

The Blogs Mess

I’ve been trying to figure out a way to synchronize blog software, and I don’t think I like the answers. I’ll probably keep using WordPress although its spam blocking features are not that great.

gnucash 2.0.2 for Foresight

Yesterday I finally got around to transfer the recipes from my private Conary repository into the foresight.rpath.org@fl:1-devel branch. Everything is now built, you should be able to use the above label to try out the newer gnucash.

Some of the intricacies included:

  • newer guile and slib packages conflict with umb-scheme. You’ll have to get rid of umb-scheme.
  • gnome-games needed to be recopiled against the newer guile.
  • guile and slib are pretty evil to compile, I had to use tag handlers. You have to start somewhere :-)
  • I have split the HBCI support into a different package, gnucash-hbci. The reason for that was the extra dependency on aqbanking which was pulling in the KDE libraries.
    This extra package would allow you to do online banking with Gnucash, if your bank supports the OFX protocol (and most do, except that you will not get that information from the bank). Follow this link to learn more than you wanted to know about the mess.

Happy managing of your financials! :-)