06/24/08

  10:06:53 pm by wdawe, Categories: centos, linux

Now that hard drives are so cheap I decided to copy a whole stack of archival DVD's onto a hard drive. I wanted to use a shell script because the copy was running on a machine that didn't have a monitor or keyboard attached. The idea was to feed it DVD's every time the drawer popped open until the stack was done.

Step 1 was to add a HAL callout to run a script whenever the DVD was inserted. I create a file called 31-dvdinsert.fdi in /usr/share/hal/fdi/information/20thirdparty/ which is where these things go in Centos or Redhat 5 systems. The name isn't that important but the extension .fdi is. Forget the .fdi and it won't work. On this particular system the DVD drive resides at /dev/hdc, using ls -l /dev/cdrom will show you where it is on your system. The contents of the file were:

XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<device>
  <match key="block.device" string="/dev/hdc">
                <append key="info.callouts.add" type="strlist">dvdinsert</append>
  </match>
</device>
</deviceinfo>

Next I created a shell script in /usr/libexec called dvdinsert

Code

#!/bin/sh
echo $HALD_ACTION >> /var/log/messages
case $HALD_ACTION in
  add)
    sleep 1  # May be unnecessary, experiment
    echo  dvdinsert DVD inserted >> /var/log/messages
    /usr/libexec/dvdinsert1 "$HAL_PROP_VOLUME_LABEL" &amp;
    sleep 1
    ;;
  remove)
    echo DVD removed >> /var/log/messages
    ;;
esac

The purpose of this script is to call another script to do the actual copying. HAL callouts can only run for a very short time before they are terminated. This script passes the Volume name of the DVD inserted to dvdinsert1 which is run as a detached process. THe contents of dvdinsert1 are shown below.

Code

#!/bin/sh
    echo  dvdinsert1 DVD inserted >> /var/log/messages
    echo $1 >> /var/log/messages
    mount /dev/hdc /media/dvd
    echo "mount complete" >> /var/log/messages
    cp -a /media/dvd "/mnt/backup/$1"
    echo "copy complete" >> /var/log/messages
    sleep 1
    umount /media/dvd
    echo "umount complete" >> /var/log/messages
    /usr/bin/eject
    echo "eject complete" >> /var/log/messages

This script does the actual copying of the files to a subdirectory found that it creates in /mnt/backup where an external usb drive is mounted. It also puts some messages in /var/log/messages so that you can keep track of the copy progress. You will need to create the /media/dvd mountpoint so the DVD can be mounted by the script. If you know a better way to do this feel free to leave a comment.

  12:37:13 am by wdawe, Categories: General, camping

For a number of years the Explorer group that I help out with has gone canoing around this time of year near Parry Sound Ontario. One of the reasons to go at this time is to avoid the biting insects including black flies and mosquitoes which are prevalent earlier in the season. In previous years I have even napped unprotected in the middle of the day and remained unmolested. Any bugs that we did encounter occurred at sunset and were minimally disruptive. This year was a different story, the bugs were savage and unrelenting. Other than when we were on the water we were surrounded by clouds of insects. Everyone was wearing bug nets almost constantly. At one point while seated on the commode in the woods I looked down to see more mosquitoes than I have ever seen in one place hovering around my uncovered legs. It looked like the old mosquito repellent commercial where the researcher placed his unprotected arm in the clear box of mosquitoes. One the left side of my neck I have a number of bumps where my mosquito net was resting against my neck which the insects took full advantage of. When I went to take a shower after returning home one of my socks was ringed with small blood stains where the black flies had came up my one pant leg and bitten me at the top of my sock. Strangely the other ankle only had one bite. The gruesome picture below, which is not for the faint of heart, shows the bites on the other ankle. I have used a smaller thumbnail than normally to minimize the horror. I also had a bite right in the middle of my forehead. They all itch like mad but I didn't feel the bugs when they were biting me. Is this unusual insect activity one of the side effects of global climate change? Only time will tell.
Bug Bitten Ankle

06/17/08

  02:54:11 am by wdawe, Categories: General

I have recently noticed a bunch of generic search.live.com searches showing up in my blog referrer logs. These searches are for single words amd include the words; links, summer, rogers, tired, install, click, system, third, December, weather, place and others. Why would people be searching for generic terms like that and why would they be clicking on links to my blog? The mystery deepens when I check the IP addresses and find they come from a block owned by Microsoft. What could the dudes in Redmond be up to? Hmmmmmmm, anybody got any theories out there?

You may have notice the Emusic.com banner at the bottom of the page. I've been a member of emusic.com for a number of years, complained when they turned me down for their affiliate program and when they apologized and let me in I then neglected to add a badge to my page for oh, about a month. Now it's done, I have sucumbed to the desire to make this pile of bytes pay me back in some small monetary way. I'm not expecting much and the only reason I'm putting an emusic banner on the page is because I think they are a worthwhile service for anyone who is into indie music. Check them out, take the 25 free mp3 and cancel right away if you wish. That was my plan when I signed up over 2 years ago. I dare you to see if you can stop at 25.

06/15/08

  08:22:23 pm by wdawe, Categories: General

I thought Rickrolling was passe until I saw this video.Sir Mixalot meets Rick Astley

" type="application/x-shockwave-flash" width="425" height="344">

06/14/08

  03:29:15 pm by wdawe, Categories: EEEPC

I was IM'd last night by one of my friends, who horrified by how much he was spending of internet cafe's on his vacation, bought an EEEPC. When I first got mine I found eeeuser.com an invaluable resource. Between the message board and the Wiki there is tonnes of information available. As with any large resource it can be hard to find what you are looking for. One the most useful articles was the the how to on shrinking firefox. I wanted to give my friend the reference to it but couldn't remember the search terms I had used to find it in the first place. This morning I decided to make a concerted effort to find it again and document it here. The howto has lots of tips but the ones I found most useful were the items under the heading "Using a single toolbar". I'm too lazy to try to get permission to reproduce those particular instructions so you can go and look them up yourself.

These settings mods may not be required for Model 900 users because of it's larger screen.

::

Cool web tools, EEPC tips and Linux info. Browse around, I'm sure you will find something to interest you.

Search

  XML Feeds

Web Site Builder