I was looking through your script as inspiration for a similar one I put together which installs various window environments, and noticed that you were editing the rc.conf directly, and the kld_list part could blow away other modules listed to be loaded, so I changed it to use sysrc kld_list+="module" and updated the earlier section where you turn stuff like moused on to use sysrc as well since I was in there.
I was looking through your script as inspiration for a similar one I put together which installs various window environments, and noticed that you were editing the rc.conf directly, and the kld_list part could blow away other modules listed to be loaded, so I changed it to use sysrc kld_list+="module" and updated the earlier section where you turn stuff like moused on to use sysrc as well since I was in there.