upstart

cat <<EOF> /etc/init/cdromrun.conf
start on started tty1
#start on runlevel 2
stop on runlevel [!2]
 
console output
 
script
   [ -f /cdrom/run ] && exec /cdrom/run
end script
EOF
 
# Links
http://upstart.ubuntu.com/cookbook/
http://upstart.ubuntu.com/getting-started.html
http://wiki.frugalware.org/index.php/Upstart_Job_HOWTO