There's another directory /etc/init.d you put the script in there. Something like
Code:
#!/bin/sh
case "$1" in
start )
#Put your code here
;;
stop|restart|status )
echo "This script does not do anything for $1"
;;
* )
echo "usage:$0 {start|stop|restart|status}"
exit 1
;;
esac
Then create two symlinks one in /etc/rc0.d and one in /etc/rc6.d with
cd /etc/rc0.d
ln -s ../init.d/scriptname S10scriptname
cd ../rc6.d
ln -s ../init.d/scriptname S10scriptname
The numbers are low in case anything that is shutdown by a script later thats required is still there.
Edit: also don't forget to make the script executable
chmod +x scriptname