Autorun shell scripts upon system boot up

Hello i searched in google and it seems i cannot find a detailed instruction on how to setup autorun-ing custom shell script upon boot up, someone kind enough to point me to a link? or a guide. We use Solaris 10.

Basically my script just contains sending email when system bootup.

Either you create a full blown SMF service or just create a legacy rc script.
eg: /etc/rc3.d/S99bootup-mail

Thanks, do the script needs to accept "stop|start" argument in legacy service?

They should as they are called with these arguments.