LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 03-25-2009, 05:48 AM   #1
lincoln.runwal
LQ Newbie
 
Registered: Dec 2008
Posts: 28

Rep: Reputation: 15
Init scripts shebang


Hi,
I read all the init script in RHEL 5 but i saw that there is a same line in starting called SHEBANG . and another line is CHKCONFIG :2345 45 10 . but both these line are commented is there any use of these lines are something meaninig . and can i delete this line from all init script.
Thanks
 
Old 03-25-2009, 06:22 AM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
NO, do not delete them.

The 'shebang' is not actually a comment, it just looks like it.

The system looks at the first line of a script to determine what lang/shell its written in and runs that.

#!/bin/bash
means run the bash shell (prog) in /bin & pass this script to it

#!/usr/bin/perl
means run the perl prog in /usr/bin & pass this script to it

hte '#!' as a the first chars in line one are a special signal to the system


As for chkconfig, try

man chkconfig
especially the section 'RUNLEVEL FILES'

Last edited by chrism01; 03-25-2009 at 06:24 AM.
 
  


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
Init Scripts brazilian_user Linux - General 3 12-05-2006 09:51 AM
what is the scripts in /etc/init.d for? blackzone Linux - General 7 09-07-2006 12:10 AM
init scripts lvgandhi Debian 2 10-11-2005 03:44 AM
New init scripts? xconspirisist Fedora 9 12-09-2004 12:41 PM
Scripts in /etc/rc.d/init.d correro Linux - General 1 03-13-2003 10:47 PM


All times are GMT -5. The time now is 11:47 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration