In jboss-datagrid.sh it checks executable bit on /etc/rc.d/init.d/functions: if [ -x /etc/rc.d/init.d/functions ]; then but the /etc/rc.d/init.d/functions is not executable, it always false. It should be "-r".