What's the difference between /etc/init.d and /sbin/service

Nathan Huang nathan.vorbei.tech at gmail.com
Sat Apr 18 15:15:38 UTC 2009


Craig White wrote:
> On Sat, 2009-04-18 at 22:32 +0800, Nathan Huang wrote:
>   
>> Hi guys
>> I face a problem, What 's the difference between these two commands?
>>
>> [mirandam at charon ~]$ su -c '/etc/init.d/NetworkManager stop'
>>
>> [mirandam at charon ~]$ |su -c '/sbin/service NetworkManager start 
>>     
> ----
> assuming that the | character was a type and that you put a single quote
> at the end of the second statement, the difference would be that the
> first statement stops NetworkManager daemon and the second one starts
> it.
>
> /sbin/service $SOME_initscript_located_in_/etc/init.d/ and
> /etc/init.d/$SOME_initscript are essentially the same
>
> Craig
>
>
>   
    Hi Craig
 we can stop NetworkManager from typing '/sbin/service NetworkManager 
stop' Why we can also stop NetworkManger from /etc/init.d/NetworkManager 
stop? What's the difference between these two places?
thanks
nathan




More information about the fedora-list mailing list