initscript questions


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers initscript questions
# 1  
Old 04-04-2004
initscript questions

can anyone tell me what the following mean.....
1. ! bash/bin and what is its significance...
2. what are runlevels like 1, 2, 3, 4....what do they mean???
this was picked up from the /etc/init.d/crond file......its an initscript.
# 2  
Old 04-04-2004
#!/bin/bash tells your OS what program to run the script with. in this case, it is bash. in others, it could be #!/bin/perl. it depends on what language the script was written in.

runlevels are a nice concept to have. this is from my inittab file on suse linux 8.2:

# runlevel 0 is System halt (Do not use this for initdefault!)
# runlevel 1 is Single user mode
# runlevel 2 is Local multiuser without remote network (e.g. NFS)
# runlevel 3 is Full multiuser with network
# runlevel 4 is Not used
# runlevel 5 is Full multiuser with network and xdm
# runlevel 6 is System reboot (Do not use this for initdefault!)


in the /etc/inittab file you can specify default runlevel, of which are described above. from there you might have an /etc/rc.d/ directory. from here you can customize your runlevels. each runlevel starts services according to what is defined in the /etc/rc.d/ directory. you can add or take away services that are run at boot to customize your system however you want.
# 3  
Old 04-04-2004
# 4  
Old 04-04-2004
Quote:
Originally posted by norsk hedensk
#!/bin/bash tells your OS what program to run the script with. in this case, it is bash. in others, it could be #!/bin/perl. it depends on what language the script was written in.

runlevels are a nice concept to have. this is from my inittab file on suse linux 8.2:

# runlevel 0 is System halt (Do not use this for initdefault!)
# runlevel 1 is Single user mode
# runlevel 2 is Local multiuser without remote network (e.g. NFS)
# runlevel 3 is Full multiuser with network
# runlevel 4 is Not used
# runlevel 5 is Full multiuser with network and xdm
# runlevel 6 is System reboot (Do not use this for initdefault!)


in the /etc/inittab file you can specify default runlevel, of which are described above. from there you might have an /etc/rc.d/ directory. from here you can customize your runlevels. each runlevel starts services according to what is defined in the /etc/rc.d/ directory. you can add or take away services that are run at boot to customize your system however you want.
norsk hedensk is very detail very informative. Smilie
# 5  
Old 04-04-2004
Quote:
Originally posted by norsk hedensk
#!/bin/bash tells your OS what program to run the script with. in this case, it is bash. in others, it could be #!/bin/perl. it depends on what language the script was written in.

runlevels are a nice concept to have. this is from my inittab file on suse linux 8.2:

# runlevel 0 is System halt (Do not use this for initdefault!)
# runlevel 1 is Single user mode
# runlevel 2 is Local multiuser without remote network (e.g. NFS)
# runlevel 3 is Full multiuser with network
# runlevel 4 is Not used
# runlevel 5 is Full multiuser with network and xdm
# runlevel 6 is System reboot (Do not use this for initdefault!)


in the /etc/inittab file you can specify default runlevel, of which are described above. from there you might have an /etc/rc.d/ directory. from here you can customize your runlevels. each runlevel starts services according to what is defined in the /etc/rc.d/ directory. you can add or take away services that are run at boot to customize your system however you want.

Something to note on top of this, is that what each runlevel does out of the box can vary between systems, for example Slackware Linux has Multiuser + X as runlevel 4 rather than 5.
# 6  
Old 04-05-2004
Quote:
what each runlevel does out of the box can vary between systems
right. i forgot to mention that, but that is why i specified my system. so remember that it is important to make sure you know how your particular system is configured.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Print questions from a questions folder in a sequential order

1.) I am to write scripts that will be phasetest folder in the home directory. 2.) The folder should have a set-up,phase and display files I have written a small script which i used to check for the existing users and their password. What I need help with: I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies

2. Shell Programming and Scripting

More ps questions.

Hey all, Thanks for all the help you have given me. Two more things I am trying to figure out. I need to issue a command..example ps -ef | grep <process> This would return about 10-15 running processes. I need to verify that there are x amount of processes running. What is... (7 Replies)
Discussion started by: jeffs42885
7 Replies

3. Programming

C++ questions

1.) Let's say I have a list: apple1, apple2, apple3, apple4, apple5 Does anyone know how to display the txt file using c++? Does anyone know how to insert apple6 into the text file using link list and show the whole list including apple6? (1 Reply)
Discussion started by: bscot008
1 Replies

4. Programming

A few C questions

Hi guys. I'm writing a basic script in C# and there's a few areas where I am stuck, and I was wondering if you may be able to help me? 1) Can you embed an image into the source code so it will show in the windows GUI? 2) Can you change the background of the GUI? 3) How do you add an .ico to... (5 Replies)
Discussion started by: JayC89
5 Replies

5. UNIX for Dummies Questions & Answers

few questions

hi , i have got few questions 1) i created a file "-myfile" .how can i remove this?what command shud i issue 2) i used echo "TODAYS DATE" ; DATE..........but date is comoing in second line..how can i make it come in single line? 3) how can i list all files in a directory using for... (5 Replies)
Discussion started by: vivekshankar
5 Replies

6. UNIX for Dummies Questions & Answers

initscript again

hi...thanx all of you for clearing out my previous doubts....but i have some more in the following, reload() { echo -n $"Reloading cron daemon configuration: " killproc crond -HUP retval=$? echo return $RETVAL 1. why is echo used here without any arguments??? 2.what does the... (1 Reply)
Discussion started by: urwannabefriend
1 Replies

7. UNIX for Dummies Questions & Answers

initscript

hi...my project requires me to open the initscript of any server or daemon like xinetd and understand all the init tags etc and the coding that i have no idea about....any suggestions on how to proceed??? (2 Replies)
Discussion started by: urwannabefriend
2 Replies

8. UNIX for Dummies Questions & Answers

questions

Dear Guys , I have some Questions , i need to have answeres for . 1. now if i took a back up for /etc/passwd and /etc/shadow , like simple copy .. and Install a new system , and paste those two files to the new system ... are the passwords and user info. going to work ?? is it posibble ? ... (1 Reply)
Discussion started by: tamemi
1 Replies
Login or Register to Ask a Question