LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   What part of the boot process executes just before the login screen? (https://www.linuxquestions.org/questions/ubuntu-63/what-part-of-the-boot-process-executes-just-before-the-login-screen-874653/)

Vanyel 04-12-2011 06:03 PM

What part of the boot process executes just before the login screen?
 
In Ubuntu 10.10 I want to have a shell script execute on bootup after everything else is done, *just* before the computer gets to and sits at the login screen. I find this easy in CentOS/Red Hat. If I place my scripts in /etc/inittab near the end, right after the mingettys, that is PERFECT!

But Ubuntu has no /etc/inittab and I have spent the past few days going over and over and OVER more info about Upstart and the rcX scripts and I can't seem to get it. Anything I place in an rcX script runs too late, only after the machine is past the login screen i.e. a human must log in first. And I would rather not have to enable auto-login. I've heard that Ubuntu will honor an /etc/inittab file if you create one, and it does, but that too runs too late, only after a human has logged in.

Can anyone tell me where a script should be placed in Ubuntu to execute after all system initialization is done, but before human interaction is required?

carltm 04-12-2011 07:56 PM

On most distros you can create a file /etc/rc.local which will run
any commands or scripts at the very end of the boot process. I'll
bet that Ubuntu has one, although I don't know it for a fact.

If not, you could easily create a file named rc.local in /etc/init.d
and have it run /etc/rc.local if it exists. You would then need to
enable the rc.local service and have it be the last service started.

Vanyel 04-15-2011 02:53 PM

No good. Everything in the rcX scripts, including rc.local, runs AFTER a user has logged in. I need this to run before the login screen, but otherwise after everything else has initialized. That way, if the machine needs to be rebooted remotely, the script will run without needing a person at the keyboard to login.

syg00 04-15-2011 05:52 PM

?????

Vanyel 09-13-2019 04:28 PM

It's moot.
 
This old thread became moot as it was the lone Ubuntu thing I had to deal with among all my CentOS/RHEL boxes, and it later went away. I'm marking it closed.


All times are GMT -5. The time now is 07:00 PM.