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!
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.
There is less than 24 hours left to vote in the 2015 LinuxQuestions.org Members Choice Awards. Click here to go to the polls. Vote now and make sure your voice is heard!
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
So i want to run some scripts automatically after reboot. I use Ubuntu 6.06 RC.
I have tried to place it in the /etc/init.d directory but the script cannot run because it needs additional files (example: 'Unable to open dat/userlist.db! Aborting connection')
So how can i make it happen?
Depending on your system, it goes in init.d--AND must be linked somewhere. In my system, it's one of the rcX.d directories.
<<edit--just noticed that you have Ubuntu also--look in /etc for a string of directories rc1.d, rc2.d, etc.>>
As for this:
'Unable to open dat/userlist.db! Aborting connection'
We can't help you if we don't know what the file is that it is trying to access.
Hint: Get the script working before you try putting it in your startup routine.
Ok--where is the file that it is trying to open? Could it be that it wants that file to be in the same directory? (You may have to go into the script to see how the file is called.)
To set up the init scripts:
init goes to one of the rcx.d directories depending on what runlevel is selected--eg runlevel 5 for the full GUI. In the rcx.d directory, there are links to the actual scripts in init.d The links have a special format: K means kill, S means start--then the numbers are used to control the order in which things are started.
Example: you will be booting into runlevel 5 and you want to start the script "sally":
put the script in init.d and make sure it is executable
in rc5.d, run "ln -s ../init.d/sally S##sally, where ## is a number that will put it in the right sequence. The default would be to put it after all the other "S"s in the folder.
"man init" for more details......and peruse the various links and scripts to get a feel for what is happening.