1. Wake on Lan Not Working With Realtek R8168 Card

    Sun 20 December 2009

    After messing around with different kernels on Debian Lenny, I noticed that my system did no longer respond to WOL packets. The system is using an on-board Realtek R8168 chip which supports wake on lan.

    After searching and reading i found the problem. The system is using an r8168 chip, but the driver that is loaded by Linux is the r8169 driver. If the r8168 driver is loaded, as it should be, then WOL is working again.

    See also this information.

    The trick is to blacklist the r8169 module. To do so, edit the /etc/moprobe.d/blacklist file and add a line reading 'blacklist r8169'

    To make this permanent, issue the following commands as root or with sudo:

    depmod -a

    mkinitramfs -o /boot/initrd.img-$(uname -r) $(uname -r)

    After a reboot, wake on lan should be working again.

    If you have any comments email me, see the About page for contact details.
  2. Shunit2, Unit Testing for Shell Scripts

    Thu 17 December 2009

    This may be of interest to people who are as stupid as I am and write elaborate shell scripts instead of using a proper scripting language such as Python or Ruby. No I am deliberately not mentioning Perl here.

    Anyway, testing is always an issue. With PPSS, I encountered many times that some change broke something in another place. Testing if some change screwed things up manually is just tedious and a pain.

    As any person who is semi-serious about programming should have done already, I started to write some unit tests. For bash scripts, there is this unit test framework called Sunit2. It takes some effort to write tests. But once you have written some tests and witness how the tests that passed before now fail after you changed some code is priceless. Because often, you would not have found the issue before a long time.

    Tagged as : Uncategorized
    If you have any comments email me, see the About page for contact details.

Page 89 / 115