LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 03: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, 05: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, 07: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, 08:07 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
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, 08:09 AM   #5
david1941
Member
 
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS7
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:18 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
Open Source Consulting | Domain Registration