It seems that 10.7 no longer wants to run shell scripts from the script menu. This may also happen in 10.6, but I do not have an install to test it with.
No matter what script I try, the SystemUIServer crashes. And somewhere in the crash report is this ominous message:
USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER
This might have something to do with Apple tightening privileges for spawning processes, but it can be easily fixed by enclosing the shell script in AppleScript.
do shell script "sh ~/script.sh"
[kirkmc adds: I haven't tested this; I don't run shell scripts from the script menu, so I haven't seen crashes.]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20120127032453655