[SOLVED] What part of the boot process executes just before the login screen?
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.