Archive for November, 2007

PHP Users Group Meeting[s]

Tuesday, November 27th, 2007

Tomorrow is the last Wednesday of the month – the day the three PHP Users Group meetings are held:

  • Dublin: At the Metropole Pub on Townsend Street [upstairs]
  • Cork: Metropole Hotel on MacCurtain Street
  • Monaghan: Contact Kae Verens for details.

Other details are available on the Irish PHP Users’ Group website.

There’s some mapping ahead

Sunday, November 18th, 2007

Inside the next seven days two things that I am very excited about* are going to happen:

  • On Thursday (22nd November), Steve Coast from the Open Street Map project will be giving a talk at the HEAnet offices in the IFSC, Dublin.
  • There will be a “Mapping Party” in Dublin on Saturday and Sunday.

*Never said it wouldn’t be something geeky ;-)

Selectively mounting systems with sshfs

Wednesday, November 14th, 2007

I recently discovered sshfs; which is a useful way to mount remote systems via ssh.

I wanted to have some systems mounted automatically on my laptop whenever I am online but not have any timeouts or attempts to connect when I am not. This ruled out simply adding a line or two to my .bashrc file or the /etc/fstab file.

The solution?
I already use the whereami package to selectively mount nfs shares and do other things depending on my location so it was just a matter of editing the /etc/whereami/whereami.conf file to include the following:

#mount /media/server1
=home sudo -u kguest sshfs server1.example.com: /media/server1 -o workaround=rename
#mount /media/server2
=home sudo -u kguest sshfs server2: /media/server2 -o workaround=rename

The ‘home’ location is defined in my /etc/whereami/detect.conf file if the access point at home is detected:

if wlan
  testap example-ap-name  home,wdhcp
  notat  wlan,wdhcp
fi

Combined, these mean that if the whereami script detects an access point named example-ap-name (original isn’t it?) then those remote systems are mounted into the /media/server1 and /media/server2 directories.