Linux - NewbieThis 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
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.
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!
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 :-] )
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.