#!/bin/sh

mkdir $lroot/.sql 2>/dev/null
fs sa $lroot/.sql system:anyuser none
fs sa $lroot/.sql system:authuser none
fs sa $lroot/.sql daemon.scripts write
fs sa $lroot/.sql daemon.sql write
rm -f $lroot/.sql/my.cnf $lroot/.my.cnf

echo "[mysql]
host=sql.mit.edu
user=$sqluser
password=$sqlpass" > $lroot/.sql/my.cnf

ln -nfs $lroot/.sql/my.cnf $lroot/.my.cnf 2>/dev/null
