LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 12-06-2006, 06:39 AM   #1
ch485de
LQ Newbie
 
Registered: Nov 2006
Distribution: PCLinuxOS
Posts: 29

Rep: Reputation: 15
Need to install process at end of boot process


I need to start a specific process late in the booting cycle. Currently the process boots early and hangs the start up. I'm told I should install in a Local folder which will called at the end.

So I want to start CUPS. What and where do I delete CUPS and where do I move it too?

My current solution was to cancel CUPS starting automatically when I boot, and that works but manually starting CUPS from Systems isn't exactly elegant!

Any help much appreciated. Needless to say I'm a newbie and lots of detail is useful!
 
Old 12-06-2006, 06:58 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,488

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Depends on your distro - you'll not get much help if you don't provide needed info.
 
Old 12-06-2006, 07:11 AM   #3
ch485de
LQ Newbie
 
Registered: Nov 2006
Distribution: PCLinuxOS
Posts: 29

Original Poster
Rep: Reputation: 15
Sorry, it's PCLinuxOS installed on my HDD. Runs on an Acer AMD 64bit laptop with 1GB RAM.
 
Old 12-06-2006, 07:46 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,688
Blog Entries: 54

Rep: Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955
Three ways.

SysV init scripts (RHL-style)
If your distro supports RHL-style SysV init scripts (which I think it does) you'll have a /etc/(rc.d/)init.d directory containing services to start on runlevel change. In it you'll find a script called "cups or cupsd". Opening the file in a text editor should show a line like "# chkconfig: 2345 45 92" where the first set of numbers are the runlevels the service is started in, the second the position in the startup sequence and the third one the position in the shutdown sequence. Changing the second one to read "99" makes it nearly last in the bootup sequence, save and close. Running "chkconfig --del cupsd; chkconfig --add cupsd" should set it up like you want it.
* Alternatively you can edit the name of the symbolic link in the runlevel you start in, say "5" if you boot into multi-user GUI mode. Typing "mv /etc/rc5.d/S45cupsd /etc/rc5.d/S99cupsd" should do it, at the cost of being reverted if the service file gets reinstalled on say upgrade.

SysV init scripts /etc/rc.d/rc.local
Another way, if your distro supports SysV init scripts, is to simply add the command and all the arguments needed to start cups in /etc/rc.d/rc.local using a text editor.

Vixie cron
Recent versions of the Vixie cron daemon allow you to use special notations, so you can get a service to boot adding a line "@reboot root /thecommand/to/run --with-all-arguments" to /etc/crontab. Replace "/thecommand/to/run --with-all-arguments" with the actual command and arguments.

( Well, four ways, generally speaking. There's also BSD-style init in some distro's. Some can handle SysV-type init scripts like Slackware. Luckily your distro isn't hampered by BSD-style inits so it really is of no concern to you :-] )
 
Old 12-06-2006, 09:17 AM   #5
ch485de
LQ Newbie
 
Registered: Nov 2006
Distribution: PCLinuxOS
Posts: 29

Original Poster
Rep: Reputation: 15
UnSpawn - terrific answer. I even understand most of it! Method A solved the problem (ie altering the run position to 99) and I didn't even need to run the chkconfig -del/add cupsd. Having been shown how to correct the CUPS commands I was then able to use the knowledge to correct another problem with another process. Thanks for you invaluable help.
 
Old 12-07-2006, 06:47 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,488

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Quote:
Originally Posted by ch485de
UnSpawn - terrific answer.
Indeed it was. I don't use any Redhat derivatives, so wondered about how chkconfig worked. Always learning.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how a father process know which child process send the signal SIGCHLD icoming Programming 10 07-20-2010 08:26 AM
Linux boot up process Vs. Windows boot up process darkskull Linux - Software 7 12-30-2006 05:21 PM
child process usses same amount of ram as parent process socialjazz Programming 7 10-19-2006 06:48 PM
Bash Scripting - child process affecting parent process mthaddon Linux - General 1 05-02-2004 02:19 PM
How to make a programm to start at the end of startup process ayachi Linux - Software 1 04-15-2004 11:31 AM


All times are GMT -5. The time now is 06:30 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration