LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 05: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, 05:58 AM   #2
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
Depends on your distro - you'll not get much help if you don't provide needed info.
 
Old 12-06-2006, 06: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, 06:46 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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, 08: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, 05:47 PM   #6
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
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:00 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