LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-31-2011, 03:47 AM   #1
Majed17
Member
 
Registered: Jul 2011
Posts: 102

Rep: Reputation: Disabled
service xinetd restart doesn't work on gentoo


Hello, when i type as root
Code:
service xinetd restart
i get (on gentoo) -bash: service: command not found
but when i type:
Code:
/etc/init.d/xinetd restart
it works and gives the following output:
* Caching service dependencies ... [ ok ]
* Stopping xinetd ... [ ok ]
* Starting xinetd ... [ ok ]
knowing that i emerged xinetd and the first command works on another gentoo machine, its not of a big deal but i was just wondering why it is not working?

Last edited by Majed17; 08-31-2011 at 04:01 AM.
 
Old 08-31-2011, 04:57 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Maybe you became root without including root's environment, so $PATH may not have included /sbin. Make sure you don't forget the dash: 'su -' or 'sudo su -'
 
0 members found this post helpful.
Old 08-31-2011, 05:51 AM   #3
Majed17
Member
 
Registered: Jul 2011
Posts: 102

Original Poster
Rep: Reputation: Disabled
didn't work

no i am already logged in as root but i still tried
Code:
su - root
but still the same.
Code:
echo $PATH
]produces the following: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.4.5
and xinetd is present in /usr/sbin which is included in the path and this is what is bewildering...
anyway thanks for trying to help, any other ideas?
 
Old 08-31-2011, 06:10 AM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
The 'service' command is part of the initscripts package and should be located under /sbin. Does it exist ?
 
1 members found this post helpful.
Old 08-31-2011, 07:08 AM   #5
Majed17
Member
 
Registered: Jul 2011
Posts: 102

Original Poster
Rep: Reputation: Disabled
thanks for the idea

actually it didn't come to my mind that the problem is with service command, it seems that in gentoo it doesn't exist. the other server it has the service file in it but it is redhat and not gentoo. So i read in a gentoo forum that a work around is to create a file called service in /usr/sbin and put the following in its content:
#!/bin/sh
runscript /etc/init.d/$1 $2
and then
Code:
chmod +x service
but i did that and now i get:
runscript should not be run directly
anything can be done further?

edit: grammar mistakes

Last edited by Majed17; 08-31-2011 at 08:02 AM.
 
Old 08-31-2011, 07:59 AM   #6
Majed17
Member
 
Registered: Jul 2011
Posts: 102

Original Poster
Rep: Reputation: Disabled
solved

for some reason i was typing in the end the command reversed i.e.
Code:
service restart xinetd
instead of
Code:
service xinetd restart
and it is working fine. and very much thanks for the clue about the service command, it will help me in future problems
 
Old 10-25-2013, 08:26 AM   #7
knspradeep
LQ Newbie
 
Registered: Nov 2012
Posts: 21

Rep: Reputation: Disabled
Hey when I tried the same command the following error what should i want to do

/etc/init.d/xinetd: line 39: /etc/init.d/functions: No such file or directory
* ERROR: xinetd failed to start

Regards,
Pradeep
 
Old 10-25-2013, 10:27 AM   #8
Majed17
Member
 
Registered: Jul 2011
Posts: 102

Original Poster
Rep: Reputation: Disabled
What command did you try? the one with the dollar signs?
 
  


Reply

Tags
service, xinetd



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
ssh doesn't work:::had to restart everytime linuxandtsm Linux - Newbie 7 08-02-2011 07:59 PM
[SOLVED] restart doesn't work cccc Debian 8 06-04-2011 08:26 PM
xinetd doesn't work properly yzhong Linux - Newbie 2 02-03-2009 03:29 PM
apache2ctl restart doesn't work kwbolte Linux - Software 2 03-12-2006 04:49 PM
Keyboard doesn't work after RH restart win13 Linux - Hardware 0 01-07-2004 05:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:24 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