LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 04-12-2011, 06:03 PM   #1
Vanyel
Member
 
Registered: Jul 2007
Location: NY, NY
Distribution: RHEL, CentOS, MacOS X
Posts: 158

Rep: Reputation: 29
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?
 
Old 04-12-2011, 07:56 PM   #2
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 99
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.
 
Old 04-15-2011, 02:53 PM   #3
Vanyel
Member
 
Registered: Jul 2007
Location: NY, NY
Distribution: RHEL, CentOS, MacOS X
Posts: 158

Original Poster
Rep: Reputation: 29
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.
 
Old 04-15-2011, 05:52 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
?????
 
Old 09-13-2019, 04:28 PM   #5
Vanyel
Member
 
Registered: Jul 2007
Location: NY, NY
Distribution: RHEL, CentOS, MacOS X
Posts: 158

Original Poster
Rep: Reputation: 29
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Takes too much time to login screen after boot process hnpat Linux - Server 22 09-17-2009 04:09 AM
X.org problems: black screen on 8.04 after Ubuntu boot process BigRedBall Ubuntu 6 06-26-2009 05:44 AM
how to change boot screen,splash screen,login themes while custmzing ubuntu cd project_sap Linux - Newbie 1 04-07-2008 07:12 AM
Logout process - can't get back the login screen DarkChief Linux - General 4 04-21-2004 05:45 AM
Help!!! Can't even login after boot process (newbie!) BigJPR Linux - Newbie 9 05-01-2003 08:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 10:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration