If you have a rc.local looking like this:
and files in /etc/rc.local.d looking like this
hostname.sh sshkeys.sh firstboot.sh
it’s not going to work.
Why, you ask, after cursing and shouting for the past hour?
because run-parts ignores files with dots (“.”) and/or .sh files.
Yes. True story.
rename all the files to:
hostname sshkeys firstboot
and your problem will be solved (and of course chmod +x them).