The HA-Tools provide some programs to improve shell scripting, especially in a High Availability environment. The halockrun program provides a simple and reliable way to implement locking in shell scripts (a typical usage for halockrun is to prevent cronjobs to run simultanously), and the hatimerun program provides a time-out mechanism.