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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2009-04-18 at 23:15 +0800, Nathan Huang wrote:
> 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@charon ~]$ su -c '/etc/init.d/NetworkManager stop'
> >>
> >> [mirandam@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
----
from 'man service'

DESCRIPTION
service  runs  a System V init script in as predictable environment as
possible, removing most environment variables and with current working
directory set to /.

Craig


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux