LinuxQuestions.org
Visit Jeremy's Blog.
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 09-09-2013, 04:55 AM   #1
Grtyop
Member
 
Registered: May 2013
Location: Over the Rainbow..
Distribution: LinuxMint , RedHat
Posts: 31

Rep: Reputation: Disabled
chkconfig [service name] not displaying any return values.


In the chkconfig man page --> " When chkconfig is run with only a service name, it checks to see if the service is configured to be started in the current runlevel. If it is, chkconfig returns true; otherwise it returns false. "

But when I execute chkconfig xinetd for example , there is no output. xinetd is already on under chkconfig.

False output refers to no output ?

Thanks.
 
Old 09-09-2013, 06:05 AM   #2
tonmoy
LQ Newbie
 
Registered: Apr 2013
Location: Dhaka, Bangladesh
Distribution: CentOS, Red Hat
Posts: 28

Rep: Reputation: 2
do as follows:

chkconfig --list xinetd

"chkconfig xinetd" outputs nothing

Quote:

chkconfig --list [name]
chkconfig --add name
chkconfig --del name
chkconfig [--level levels] name <on|off|reset>
chkconfig [--level levels] name

please check manual for details
 
1 members found this post helpful.
Old 09-09-2013, 08:31 AM   #3
Grtyop
Member
 
Registered: May 2013
Location: Over the Rainbow..
Distribution: LinuxMint , RedHat
Posts: 31

Original Poster
Rep: Reputation: Disabled
Okay thanks, so the wording in the man page is kinda wrong ? :O
 
Old 09-09-2013, 09:07 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,251

Rep: Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624
Nope. You need to check the commands exit status.

The "returns true; otherwise it returns false" does not actually mean the command will output the words true or false.

http://www.cyberciti.biz/faq/shell-h...-unix-command/
 
1 members found this post helpful.
Old 09-09-2013, 09:09 AM   #5
david1941
Member
 
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS6
Posts: 267

Rep: Reputation: 58
"chkconfig" name output nothing but does set the result code (As the man indicates)

Code:
 [root@maplepark ~]# chkconfig smb && echo "configured to be on"
configured to be on
[root@maplepark ~]# chkconfig virt-who && echo "configured to be on"
[root@maplepark ~]#
 
1 members found this post helpful.
  


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
service tomcat does not support chkconfig jsaravana87 Linux - Server 1 06-18-2012 04:18 AM
[SOLVED] chkconfig return values youngstorm Linux - General 6 04-10-2012 08:47 AM
chkconfig runs script with different PATH values dchester11 Linux - Server 3 10-07-2010 10:36 PM
[SOLVED] chkconfig: cannot add new service. deostroll Linux - Server 5 03-09-2010 02:09 AM
service foo does not support chkconfig packets Linux - Newbie 2 12-18-2006 11:23 PM


All times are GMT -5. The time now is 05:00 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration