After reading this hint about display a random fortune in your Login Window, I decided that I wanted to do something similar. I have three boot disks (Panther, Tiger, and Backups), and since they all look almost identical when booting and logging in (and even after logging in), I wanted to provide a way to tell which system was booted.
I was surprised to find that Mac OS X 10.4 (Tiger) disabled the LoginHook as described in the above hint. However, I found a forum post that describes how it works in 10.4. My investigation ("hacking around") leads me to believe that the LoginHook is run either after the Login Window is displayed or (more likely) after someone (anyone) logs in.
Since I wanted to be able to change the Login Window text for every login (especially for the first login after a restart), I couldn't wait for LoginHook. Since I wanted this to work in Panther, too, I couldn't use launchd (does anyone know a good launchd tutorial, though?). So, following Apple's advice, I created a StartupItem!
Perform all of the following tasks as root or using sudo:
{
Description = "Sets LoginwindowText";
Provides = ("logintext");
}
drwxr-xr-x 4 root wheel /Library/StartupItems/logintext/
-rwxr-xr-x 1 root wheel /Library/StartupItems/logintext/StartupParameters.plist*
-rwxr-xr-x 1 root wheel /Library/StartupItems/logintext/logintext*
/sbin/SystemStarter start logintext
You might need to reboot before SystemStarter recognizes this StartupItem, though. You can check the results of your current Login Window Text by typing:
defaults read /Library/Preferences/com.apple.loginwindow LoginwindowText
[robg adds: If you want an old-fashioned LoginHook executable in Tiger, this tech note describes the process...]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20050616081448481