It seems that csf runs csfpost.sh with sh instead of just using the shebang that was specified. This causes some unexpected behaviour if you need more logic in these files.
I can only reproduce this on Ubuntu, CentOS has no problems. I've added the following code to csfpost.sh:
#!/bin/bash
if [ ! "$BASH_VERSION" ] ; then
echo "Please do not use sh to run this script ($0)"
fi
I'd suspect this is because /bin/sh is actually bash (or bash family) on one but not the other - check out /bin/sh and /usr/sbin/sh. A simple solution is to exec bash if you really need the logic, or to rewrite so it works in pure sh (generally possible, but not always easily) - code would look something like this (untested):