Index: trunk/locker/bin/cronload
===================================================================
--- trunk/locker/bin/cronload	(revision 1838)
+++ trunk/locker/bin/cronload	(revision 1901)
@@ -1,3 +1,17 @@
 #!/bin/sh
+
+usage="Usage \"$0 [-l lockername] [-h] crontab\""
+while getopts "l:h" options; do
+    case $options in 
+        l ) lname=$OPTARG;;
+        h ) echo "$usage"; exit 0;;
+        * ) echo "$usage"; exit 1;;
+    esac
+done
+shift `expr $OPTIND - 1`
+if [ -z "$1" ]; then
+    echo "$usage"
+    exit 1
+fi
 
 echo "This program should print your new crontab below."
@@ -6,5 +20,22 @@
 echo
 
+
 cwd=`pwd`
-lname=`perl -e "\\\$temp = \"$cwd\"; \\\$temp =~ /\\\/([^\\\/]+)\\\/cron_scripts/; print \\\$1"`
+if [ -z "$lname" ]; then
+    lname=`perl -e "\\\$temp = \"$cwd\"; \\\$temp =~ /\\\/([^\\\/]+)\\\/cron_scripts/; print \\\$1"`
+fi
+if [ -z "$lname" ]; then
+    echo "ERROR: Could not detect locker name. Make sure to run"
+    echo "cronload from within /mit/lockername/cron_scripts/"
+    echo "(or pass the -l lockername option)"
+    exit 1
+fi
 athrun scripts scripts-ssh "$lname" /usr/local/bin/cronload "$1" "$cwd" 2>/dev/null
+if ! grep -q "^MAILTO=" "$1"; then
+    echo "WARNING: You have no MAILTO= variable set. This means any"
+    echo "cron errors will go to $lname@scripts.mit.edu (your mail_scripts"
+    echo "account), which is almost certainly not what you want!"
+    echo "Please add a MAILTO= line, e.g., MAILTO=${EMAIL:-${ATHENA_USER:-$USER}@mit.edu},"
+    echo "to your crontab. If you do not want to receive errors, set"
+    echo 'MAILTO="".'
+fi
Index: trunk/locker/bin/crontab
===================================================================
--- trunk/locker/bin/crontab	(revision 1838)
+++ trunk/locker/bin/crontab	(revision 1901)
@@ -9,5 +9,5 @@
 # (can be useful for debugging)
 # You can always redirect the output of individual commands to /dev/null
-MAILTO="SCRIPTS_USER@mit.edu"
+MAILTO="ATHENA_USER@mit.edu"
 # If you do not want to receive any mail from cron, use the line below instead
 #MAILTO=""
@@ -22,5 +22,5 @@
 #  | | | | |
 #  | | | | ----- day of week (0 - 6) (Sunday=0)
-#  | |  | ------- month (1 - 12)
+#  | | | ------- month (1 - 12)
 #  | | --------- day of month (1 - 31)
 #  | ----------- hour (0 - 23)
Index: trunk/locker/bin/for-each-server
===================================================================
--- trunk/locker/bin/for-each-server	(revision 1838)
+++ trunk/locker/bin/for-each-server	(revision 1901)
@@ -1,14 +1,5 @@
 #!/bin/sh
 
-case `machtype` in
-    linux|darwin)
-        TAIL_ARG="-n"
-	;;
-    *)
-        TAIL_ARG=""
-	;;
-esac
-
-for server in `finger @scripts.mit.edu | tail ${TAIL_ARG} +5 | sed -n "s/  -> \([^:]*\):.*/\1/p" | sort -u`; do
+for server in `finger @scripts.mit.edu | sed -n -e "1,5d" -e "s/  -> \([^:]*\):.*/\1/p" | sort -u`; do
     ssh "$server" "$@"
 done
Index: trunk/locker/bin/scripts-git
===================================================================
--- trunk/locker/bin/scripts-git	(revision 1901)
+++ trunk/locker/bin/scripts-git	(revision 1901)
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+sname="git repository"
+deploy="git"
+create_scripts_dir=1
+requires_sql=0
+prompt_username=1
+prompt_password=0
+. /mit/scripts/deploy$scriptsdev/bin/onathena
Index: trunk/locker/bin/scripts-mediawiki
===================================================================
--- trunk/locker/bin/scripts-mediawiki	(revision 1838)
+++ trunk/locker/bin/scripts-mediawiki	(revision 1901)
@@ -2,6 +2,6 @@
 
 sname="MediaWiki"
-deploy="mediawiki$scriptsstar"
+deploy="mediawiki"
 prompt_username=1
 wizard="mediawiki"
-. /mit/scripts/deploy$scriptsdev/bin/onathena$scriptsstar
+. /mit/scripts/deploy$scriptsdev/bin/onathena
Index: trunk/locker/bin/scripts-wordpress
===================================================================
--- trunk/locker/bin/scripts-wordpress	(revision 1838)
+++ trunk/locker/bin/scripts-wordpress	(revision 1901)
@@ -2,6 +2,6 @@
 
 sname="WordPress"
-deploy="wordpress$scriptsstar"
+deploy="wordpress"
 prompt_password=0
 wizard="wordpress"
-. /mit/scripts/deploy$scriptsdev/bin/onathena$scriptsstar
+. /mit/scripts/deploy$scriptsdev/bin/onathena
Index: trunk/locker/bin/signup-cron
===================================================================
--- trunk/locker/bin/signup-cron	(revision 1838)
+++ trunk/locker/bin/signup-cron	(revision 1901)
@@ -10,5 +10,9 @@
   fs sa /mit/$lname/cron_scripts daemon.scripts write
   DATE=`date`
-  sed '/SCRIPTS_USER/s//'"$lname"'/g' /mit/scripts/deploy/crontab | sed '/SCRIPTS_DATE/s//'"$DATE"'/g' > /mit/$lname/cron_scripts/crontab
+  signupuser=`echo "$principal" | sed 's/[/@].*$//'`
+  sed '/SCRIPTS_USER/s//'"$lname"'/g' /mit/scripts/bin$scriptsdev/crontab | sed '/ATHENA_USER/s//'"$signupuser"'/g' | sed '/SCRIPTS_DATE/s//'"$DATE"'/g' > /mit/$lname/cron_scripts/crontab
+  echo "By default, output from cron jobs for the $lname locker will be mailed"
+  echo "to $signupuser@mit.edu.  You should edit /mit/$lname/cron_scripts/crontab"
+  echo "to change this and set up your cron jobs."
   success "the cron script service" "The directory /mit/$lname/cron_scripts has been created."
 else
Index: trunk/locker/bin/signup-mail
===================================================================
--- trunk/locker/bin/signup-mail	(revision 1838)
+++ trunk/locker/bin/signup-mail	(revision 1901)
@@ -9,5 +9,5 @@
   fs sa /mit/$lname/mail_scripts system:authuser none
   fs sa /mit/$lname/mail_scripts daemon.scripts read
-  signupuser=`echo "$principal" | sed 's/@.*$//'`
+  signupuser=`echo "$principal" | sed 's/[/@].*$//'`
   sed /SCRIPTS_USER/s//$signupuser/ /mit/scripts/bin/procmailrc > /mit/$lname/mail_scripts/procmailrc
   echo "By default, mail sent to $lname@scripts.mit.edu will be forwarded to"
