Linux Startup Script
===

I want a start-up script that does the following:
1.When Ubuntu Linux boots , it logs in as "root" ( simulating a normal login process and the /root/.bashrc file is executed ) 
2.It executes a script.
3.When the script terminates , the computer shuts down.

I'm having problems specifically with point #1. 


Cheers!