Intermittent network connection problem

NoOp glgxg at sbcglobal.net
Fri Dec 18 22:39:24 UTC 2009


On 12/18/2009 01:34 AM, Joep L. Blom wrote:
> NoOp wrote:
>> On 12/17/2009 02:33 PM, Joep L. Blom wrote:
...
>> However, you do realise that 'sudo service samba' invokes /etc/init.d/
>> scripts for this?
>> 
>> $ sudo service samba
>> Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload|status}
>> 
>> So I'm not entirely clear (yet) what the difference would be using
>> 'service samba' vs /etc/init.d/samba is.

> Well, looking at man service it says:
> <quote>
>   service is a command-line interface to  execute  System  V  style  init
>   script /etc/init.d/name actions.
> <quote>
> I found a nice explanation with Google:
>> http://ubuntu-tutorials.com/2007/11/13/service-tool-available-on-ubuntu-710/
> Which says:
> <quote>
> The difference between /etc/init.d and service is that service sets all 
> environment variables as they are when calling the init-scripts at boot.
> 
> When doing /etc/init.d you may inherit some variables from the shell you 
> call it from.
> <quote>
> There are more interesting remarks in that tutorial, especially now 
> ubuntu has choosen for upstart (why??)
> It also points to a more debian-related analogue invoke-rc.d. I knew it 
> existed but I never used it.
> As I'm coming from Fedora/Red Hat, I use service intuitively, e.g. when 
> fiddling with networks, etc. and I agree with one of the commenters, 
> "spread the use of service":).

Thanks... now try:
$ sudo service networking restart

$ sudo service networking restart
restart: Unknown instance:
:-)
https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/440179
[service fails to start/stop/restart a daemon]

$ sudo /etc/init.d/networking restart
 * Reconfiguring network interfaces...
            [ OK ]






More information about the ubuntu-users mailing list