[Hero CDMA Q&A, Help & Troubleshooting] TheGrammarFreak:
Oh! Permanently on? That makes life easier then.

#!/system/bin/sh

PATH=/system/xbin:/system/bin
PROP=cm.data2ext.active

echo "Initiating Data2EXT..."

PARTNO=2
EXTPART=mmcblk0p${PARTNO}
EXTDEV=/dev/block/${EXTPART}
DATADIR=/mnt/asec/data
COUNT=0
DOT=.

if mountpoint sd-ext; then
umount /sd-ext
fi

echo "Waiting for SD card to settle..."

while [ ! -h /sys/block/mmcblk0 ]; do
echo $DOT
DOT=${DOT}.
sleep 1
COUNT=$((COUNT+1))
if [ "$COUNT" -ge 10 ]; then
echo "No SD card present or SD card too slow, aborting..."
exit 1
fi
done

if [ -d "/sys/block/mmcblk0/${EXTPART}" ]; then
if [ ! -b "$EXTDEV" ]; then
echo "Device file does not exist, creating it..."
mknod $EXTDEV b 179 $PARTNO
chmod 600 $EXTDEV
fi
echo "Executing file system check..."
if e2fsck -pf $EXTDEV || e2fsck -pf $EXTDEV; then
echo "Mounting ${EXTDEV} to /data..."
else
echo "Partition check failed, manual intervention required, aborting..."
exit 1
fi
[ -d "$DATADIR" ] || mkdir $DATADIR
mount --move /data $DATADIR
if mount -t ext2 -o nosuid,nodev,noatime,nodiratime $EXTDEV /data; then
echo "EXT partition mounted..."
echo 128 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
else
echo "Mount failed, reverting to normal mode..."
mount --move $DATADIR /data
exit 1
fi
if [ ! -f /data/.data2ext ]; then
echo "First time initiation, copying files to EXT partition..."
chown 1000.1000 /data
chmod 775 /data
cd $DATADIR
cp -a `ls -A|egrep -v '^misc$|^system$|^property$|^local$|^lost\+found$|^data$'` /data/
for DIR in misc system property local data; do
ln -s ${DATADIR}/${DIR} /data/${DIR}
done
touch /data/.data2ext
fi
echo "Data2EXT enabled..."
setprop $PROP 1
else
echo "No partition for Data2EXT available, aborting..."
fi
sync

Stick that in a file named "40data2ext" and put that in /system/etc/init.d

Sorted.

Sorry it's taken so long to figure this out, I kinda assumed you'd want to default to having it on but give the choice of turning it off.

One more thing: are you wanting this to kick ass in benchamarks? If so, use this version:

#!/system/bin/sh

PATH=/system/xbin:/system/bin
PROP=cm.data2ext.active

echo "Initiating Data2EXT..."

PARTNO=2
EXTPART=mmcblk0p${PARTNO}
EXTDEV=/dev/block/${EXTPART}
DATADIR=/mnt/asec/data
COUNT=0
DOT=.

if mountpoint sd-ext; then
umount /sd-ext
fi

echo "Waiting for SD card to settle..."

while [ ! -h /sys/block/mmcblk0 ]; do
echo $DOT
DOT=${DOT}.
sleep 1
COUNT=$((COUNT+1))
if [ "$COUNT" -ge 10 ]; then
echo "No SD card present or SD card too slow, aborting..."
exit 1
fi
done

if [ -d "/sys/block/mmcblk0/${EXTPART}" ]; then
if [ ! -b "$EXTDEV" ]; then
echo "Device file does not exist, creating it..."
mknod $EXTDEV b 179 $PARTNO
chmod 600 $EXTDEV
fi
echo "Executing file system check..."
if e2fsck -pf $EXTDEV || e2fsck -pf $EXTDEV; then
echo "Mounting ${EXTDEV} to /data..."
else
echo "Partition check failed, manual intervention required, aborting..."
exit 1
fi
[ -d "$DATADIR" ] || mkdir $DATADIR
mount --move /data $DATADIR
if mount -t ext2 -o nosuid,nodev,noatime,nodiratime $EXTDEV /data; then
echo "EXT partition mounted..."
echo 128 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
else
echo "Mount failed, reverting to normal mode..."
mount --move $DATADIR /data
exit 1
fi
if [ ! -f /data/.data2ext ]; then
echo "First time initiation, copying files to EXT partition..."
chown 1000.1000 /data
chmod 775 /data
cd $DATADIR
cp -a `ls -A|egrep -v '^misc$|^system$|^property$|^local$|^lost\+found$'` /data/
for DIR in misc system property local; do
ln -s ${DATADIR}/${DIR} /data/${DIR}
done
touch /data/.data2ext
fi
echo "Data2EXT enabled..."
setprop $PROP 1
else
echo "No partition for Data2EXT available, aborting..."
fi
sync