How to run a script on boot in CM12.1? Most questions I can find related to this are dated 2011 and thereabouts, so perhaps it's not too surprising that things have changed since. I've tried a whole bunch of things, with no results whatsoever.

There are some scripts in /system/etc/init.d (which also appears under /etc/init.d on my device). In particular, there is a 00banner script which is supposed to log a welcome message. The welcome message never appears in logcat.

I've placed my own script here, which was eventually reduced to nothing but this:

#!/system/bin/sh
log -t mytest Testing


Nothing. Never appears in logcat unless run manually via terminal. Then it works.

There is also a 90userinit file here, which invokes /data/local/userinit.sh if it exists. I've created it with the same contents as above. Again, nothing ever appears in logcat. Which is not surprising, really, since if 00banner won't run then this wouldn't either.

I searched for anything named "init.rc" but nothing like that exists anywhere on my device.

All of my scripts have 755 permissions.

What else can I try? (other than apps that run scripts for me)
there is a simple method to add init.d support to any rooted android for versions 4.0 and above ,google made a script that runs at boot as superuser the script is install-recovery.shit is used to reflash stock recovery at every boot they thought it was a good security to prevent custom recoveries but it opened a new hole that can be exploited by users to fake init.d feature.
Dependencies : in order to this method to work you need the following


Busy box installed with the run-partssymlinked to your path like /system/xbin
Obviously you gonna need a rooted phone with the /system able to mount as rw
kernel version doesn't matter.


Method I : (The easiest way !)


Download this APK (free to use,don't mirror, thanks @Ryuinferno from XDA).
Install the apk like any normal app.
Launch the app.
click on Activate ! that's it you're all setinit.d is now supported you can click the test button or reboot your phone to see if your init.d scripts are exited 
you can uninstall the application it wil not affect the init.d support


Method II : (difficulty: medium)


Download this zip unzip it and put init.sh on your sdcard (in this exmple it's gonna be /sdcard it can change from device to other.
now open a terminal ,or use adb shell from computer and run the script.
su
cp /sdcard/init.sh /data/tmp/init.sh
chmod 777 /data/tmp/init.sh
/data/tmp/init.sh


the script will run and ask you to reboot twice ,that's it you have officially init.d support :D

Reference: [MOD][APK+SCRIPT+ZIP] Enable Init.d for Any Phones w/o Need of Custom Kernels!!!