This tutorial is based on wl500g hardware with Oleg's 1.9.2.7-7b firmware.

I have three different dyndns accounts and I'm using wget with cron-jobs like (macsat's cron solution) to update these accounts.
As I'm totally new to Linux, I might have made some choices that could be done differently (meaning more elegantly) and maybe also the chosen location of the files and directories does not fully comply to common Linux-practices, but hey.. it works for me!

Here we go.

Assume you have to maintain following account: wl500g.homelinux.com (this is a dyndns domain). I have decided to make my scripts reflect my chosen name in this domain, so they will show 'wl500g' in this tutorial. Please apply your own name for each domain you need to maintain.

I have made a script (/opt/etc/cron.5mins/dnsupd_wl500g.sh) to check if the current ip-address has changed. This script will run every 5 minutes (cron) and it will update the ip-address in dyndns if it finds that the ip-address has changed.
Code:
#!/bin/sh
 #Get the current ip and put it into /opt/etc/dyndns/dyndns/tmp_ip_wl500g.ip
 wget -q http://checkip.dyndns.org/index.html --output-document=/opt/etc/dyndns/tmp_ip_wl500g.ip
 #Parse the answer to get only the ip and put it into /opt/etc/dyndns/new_ip_wl500g.ip
 sed -e 's/^.*Address: //' -e 's/<.*$//' /opt/etc/dyndns/tmp_ip_wl500g.ip > /opt/etc/dyndns/new_ip_wl500g.ip
 #Check if ip has changed.
 if [ "`cat /opt/etc/dyndns/new_ip_wl500g.ip`" = "`cat /opt/etc/dyndns/old_ip_wl500g.ip`" ]
 then echo "No new IP";
 else wget -q http://dyndnsusername:dyndnspwd@members.dyndns.org/nic/update?hostname=wl500g.homelinux.com\&wildcard=ON --output-document=/opt/etc/dyndns/upd_ip_wl500g.ip
 echo "New IP";
 cat /opt/etc/dyndns/upd_ip_wl500g.ip;
 rm /opt/etc/dyndns/upd_ip_wl500g.ip;
 fi
 rm -f /opt/etc/dyndns/old_ip_wl500g.ip
 rm /opt/etc/dyndns/tmp_ip_wl500g.ip
 mv /opt/etc/dyndns/new_ip_wl500g.ip /opt/etc/dyndns/old_ip_wl500g.ip
To make this script work, you have to:
a) Make the script executable (chmod 755 /opt/etc/cron.5mins/dnsupd_wl500g.sh)
b) Create directory: mkdir /opt/etc/dyndns/

If all goes well, this script will run the check every 5 minutes. If it finds the ip address unchanged, it will do nothing. If it finds the ip changed, then the wget command will be executed to updated the registered ip at dyndns. (for more information on the syntax, see: http://www.dyndns.org/developers/specs/syntax.html)

But dyndns accounts need a forced update so they don't expire. you may update 24-35 days after your previous update with the same IP address to "touch" the record and prevent it from expiring. I want to update before the notification email from dyndns gets sent to my registration email-address, so approx. day 25 or 26 or so..

I have made another script (/opt/etc/cron.daily/dnsupd_force_wl500g.sh]) to run daily to keep a counter and run a forced ip-updated when the counter reaches 25.
Code:
#!/bin/sh
daycount="`cat /opt/etc/dyndns/dyndns_counter_wl500g`";
 if [ "`cat /opt/etc/dyndns/dyndns_counter_wl500g`" -le "24" ]
 then daycount=`expr $daycount + 1`
      echo $daycount > /opt/etc/dyndns/dyndns_counter_wl500g
 else rm /opt/etc/dyndns/old_ip_wl500g.ip
      echo 1 > /opt/etc/dyndns/dyndns_counter_wl500g
 fi
To make this script work, you have to:
a) Make the script executable (chmod 755 /opt/etc/cron.daily/dnsupd_force_wl500g.sh)
b) Create the file with the counter /opt/etc/dyndns/dyndns_counter_wl500g (echo 1 > /opt/etc/dyndns/dyndns_counter_wl500g)

Explanation: On day 25, the script will remove file /opt/etc/dyndns/old_ip_wl500g.ip and reset the counter. By removing the file /opt/etc/dyndns/old_ip_wl500g.ip, the 5mins cronjob will actually jump to the wget instruction to update the ip-address registration at dyndns.
Exceptions: When the router was powered down more than a day (no cron jobs running), the counter will not be in line with actual expiration period at dyndns. Also: The daily script should not actually run at the same time when the 5mins script is updating the file /opt/etc/dyndns/old_ip_wl500g.ip otherwise, the forced update might not work.

I have setup 3 scripts for every of my personal dyndns registrations. I've kept the script files for each account separate, so I can drop them easily when I remove the account at dyndns.

(Oh, by the way: I have disabled the dyndns upfdate in the web-admin pages of the wl500g which didn't work on mine anyway.)