Once that is done create a symbolic link in the run level directory you would like to use, for example if you wanted to run a program in the graphical runlevel 2, the default runlevel for Ubuntu, you would place it in the /etc/rc2.d directory.f the last script to be run is rc.local and it is named S99rc.local then you need to add your script as S99myscript. Each backward compatible /etc/rc*.d directory has symbolic links to the /etc/init.d/ directory.