Tested your problem under Debian and the following worked for me.
Make test.sh script in /etc/init.d with the following shell code
case "$1" in
echo "Interactive test at startup"
echo "Interactive test at shutdown"
After that create a link in the appropriate /etc/rc*.d (debians default runlevel is 2, Fedora's runlevel usually is 3 or 5)
ln -s /etc/init.d/test.sh S90test.sh
Of course you can do the same for the shutdown sequence, for example:
ln -s /etc/init.d/test.sh K10test.sh
That's it. Works like a charm.
Hope this helps.