I got annoyed having to run bcharge manually every time I connected my Pearl, so I hacked something up. Unfortunately, it really is a hack.
This will work if you use gnome-volume-manager to automount devices (most GNOME desktop systems use that these days). It should also work with any system that uses pmount-hal to mount devices, as gvm does.
Move /usr/bin/pmount-hal to a new file.
sudo mv /usr/bin/pmount-hal /usr/bin/pmount-hal-bin
Create a new file, /usr/bin/pmount-hal
sudo echo #!/bin/sh > /usr/bin/pmount-hal
sudo echo /usr/local/bin/bcharge >> /usr/bin/pmount-hal
sudo echo /usr/bin/pmount-hal-bin $1 $2 $3 $4 $5 $6 $7 $8 $9 >> /usr/bin/pmount-hal
Make the new script executable:
sudo chmod a+x /usr/bin/pmount-hal
For this to work, you may have to set the suid bit on bcharge:
sudo chmod +s /usr/local/bin/bcharge
This will run bcharge before mounting any removable device. If you connect anything other than a BlackBerry, it'll just not find anything and exit. This is an awful hack, but I couldn't find any way to execute a command before mount with gvm. I was able to do it with ivman, but I prefer to use gvm, if only to keep my system as close to a default install as possible.
Edit: Forgot to mention that for this to work, the Pearl needs to be set up to always go into mass storage mode when connected to a computer.