Archive for May, 2005

Not very clever

I feel like a bit of an idiot right now. My current credit card expires at midnight tonight. My new chip & PIN card arrived months ago and I put off using it until I absolutely had to1. I’m sure I put it “somewhere safe” but I can’t yet figure out where that place is.

[ Update ]
Rang my bank’s 24-hour banking service and had the misplaced card cancelled and requested a new one be sent out. No charge for my idiocy. Sorted!

1. The reason banks have adopted the chip & PIN solution is that it shifts the burden of liability, in the case of fradulent transactions, from the bank to the card holder. The benifit to the end user is tenuous at best.

Post Ballroom

The Clap rocked everyones faces at the Ballroom on Friday and we had a really great time too. Thanks to everyone who came and look out for The Clap coming to a venue near you again soon.The Clap are rockers, they rock outThanks to Aron from (retards) for the picture.

Only one way to fall

Flights I have taken

According to the “Great Circle Mapper“, I have flown 26142 26729 miles on unique flights, including round-trips.

Don’t Forget

Ballroom #41

Episode III

OYG.

Saturated Dichotomy

Flickr have switched from Flash to (buzzword warning) an AJAX solution for most of their interface and it’s much better, more responsive. They’ve also expanded their back-end operation and their photo servers number in the double digits. How do I know that? My Flickr RSS Wordpress plugin broke because of an assumption in a regular expression. I’ve since fixed it. Check out the plugin anyway, it’s quite simple but it works. It’s what I use to put the “Recent Flickr” thing in the side bar. You can display as many of your recent pictures as you want with it.

After lunch yesterday Stephen, James and I went up to the top floor of the multi-storey car park across the street from where we work to see what the view was like and to wave across at our colleagues toiling away. It was a beautiful afternoon, I took some pictures with my phone.

Further to my previous entry, I’m getting on quite well with Smart’s DSL. It’s as fast as they say. The best thing I’ve found with it is that I can watch movie trailers (check out Red Eye), large ones, in next to real time. Click the link, wait just a couple of seconds and it begins to play. The download will complete before the clip ends. That’s the good stuff, the bad stuff, and there’s only one thing so far, is that it’s a big disconnect-y. That’s not a problem that would effect the a lot common uses Internet uses, but for SSH sessions, and probably gaming too, it’s annoying. I’ll keep and eye on the up-and-down-ness of my connection over the next few days and if it’s quite bad I’ll have to get in touch with them. When I was on UTV’s product they had a disconnect something around every 48 hours which they explained was something to do with stats collection from the Eircom BAS’s.

With some help from Michael (Thanks!) and commercial data recovery tools I think we’ve got back quite a large chunk of the data I had feared was lost from my hard drive, that you’re all probably sick of hearing about by now. I haven’t analysed the data yet but any recovered is better than none. Rejoice!

Star Wars Episode III: Revenge of the Sith opens tomorrow and by some happy fortune I’ve managed to get into a 5 past midnight- tonight/tomorrow morning - showing courtesy of $SEARCH_ENGINE, Ireland.

Smart Telecom DSL, PPPoE, OpenBSD [Solved]

Since I had so much luck with my last problem I’m going to try it again. What follows is the body of a mail I have or will shortly be sending to some mailing lists about the difficulty I’m having establishing a PPPoE connection through my new DSL mode.

Hi Folks.

I use an OpenBSD 3.5 machine at home as my NAT/Gateway. I was with UTV recently for my DSL connectivity. I used the supplied ethernet DSL modem as a bridge and established my PPPoE session using `ppp`.

I’ve recently migrated to Smart Telecom DSL and I’m having some difficulty replicating this configuration. Has anyone on the list had any experienced setting up such configuration using Smart ant the supplied modem? The worst of it is I’m not even sure if the supplied ethernet/USB modem configured correctly to allow me to bridge.

The modem is a “Aolynk DR814″ and has the usual telnet and web interface. The provided manual didn’t mention the telnet interface but I found one here.

bridge list interfaces” produces the following output:

Bridge Interfaces:

 ID  | Name            | Filter  | Transport
     |                 | Type    |
-----|-----------------|---------|-------------
    1| ethernet        | All     | ethernet
    2| usb-ethernet    | All     | usb-ethernet
-----------------------------------------------

I can provide a detailed PPP log if it would help, I have to admit to not understanding most of what I see there.

my ppp.conf looks like this:

default:
 set log all
# set log Phase Chat LCP IPCP CCP tun command

pppoe:
 set device "!/usr/sbin/pppoe" -i ne3
 set speed sync
 set mtu max 1492
 enable lqr
 disable acfcomp protocomp
 disable ipv6cp
 deny acfcomp
 set lqrperiod 5
 set cd 5
 set dial
 set login
 set authname #######
 set authkey #######
 delete! default
 add! default HISADDR
 enable dns
 enable mssfixup

I would appreciate any help or suggestions as this is becoming quite frustrating! I wont feel like my new connection has been installed until it’s part of my current setup.

Thanks!

I’ve sent this mail to Smart support and am awaiting their reply:

Hi,

I have recently migrated from another DSL provider to Smart DSL and in our setup we use our DSL modem simply as a bridge and establish the PPPoE connection using another computer.

I haven’t been able to do this yet with the new modem. I’m not sure if I’ve turned on bridging. Do you have any information on using the supplied modem in bridge mode?

[ Update ]
I got this very prompt reply from the Chinese manufacturer of my DSL router:

Dear Cliph/ff
DR 814 support pppoe message of pc pass through the dr814 router.
You can choice pppoe login, and don’t enter username password; at this time
You can establish the PPPoE session form your pc

[ Update again ]
Garfield Connolly from Smart Telecom answered my query on Boards.ie and I’m now connected back like I used to be. That’s 2 for 2 on the problem solving. You guys are great. Time for some serious Internetting.

Interesting Shell Script Problem [Solved]

I spent yesterday writing (Bash) shell scripts like some kind of machine. I came upon this problem:

function create {
        $HTPASSWD $USERFILE $user $pass
        if [ ! `grep -q " $user " $GROUPFILE` ]; then
                echo "Adding user to group $GROUP ..."
                sed "s/$GROUP\:/$GROUP\: $user/" $GROUPFILE > $GROUPFILE.tmp
                cp $GROUPFILE.tmp $GROUPFILE
        else
                echo "User is already in group $GROUP"
        fi
}

What this should do is add a string to a file if the string is not already in the file. Simple enough but the logic in the ‘if’ is always evaluating to true. If I run the same grep on the command-line and check the return value I get the desired result:

cliph@clflood-desktop:~/bin$ grep -q hello xtranetgroups; echo $?
0
cliph@clflood-desktop:~/bin$ grep -q antihello xtranetgroups; echo $?
1

So then I tried this small piece of code to test command substitution and return codes in if statements (being in a function doesn’t seem to cause a problem):

if [ `ls ./$file` ]; then
	echo "True"
else
	echo "False"
fi

It works perfectly:

cliph@clflood-desktop:~/bin$ ./true file
True
cliph@clflood-desktop:~/bin$ ./true filenothere
ls: ./filenothere: No such file or directory
False

So that leaves me stumped, why does my grep not work in the first example?