service utility with Ubuntu 10.04 does not work properly when used to restart network

NoOp glgxg at sbcglobal.net
Mon Mar 14 17:11:39 UTC 2011


On 03/13/2011 11:21 AM, Tapas Mishra wrote:
> Here is a situation when I do
> root at tapas:~# service networking restart
> restart: Unknown instance:
> and when I do
> root at tapas:~# service networking stop
> stop: Unknown instance:
> 
> now if I do
> 
> /etc/init.d/networking stop
>   * Deconfiguring network interfaces...       Ignoring unknown
> interface eth1=eth1.
> [ OK ]
> note above I did not used service command and it shows working.
> 
> and now if I start it in same way I get a warning.
> 
> /etc/init.d/networking start
> Rather than invoking init scripts through /etc/init.d, use the service(8)
> utility, e.g. service networking start
> 
> Since the script you are attempting to invoke has been converted to an
> Upstart job, you may also use the start(8) utility, e.g. start networking
> networking stop/waiting
> In any case either service command or using /etc/init.d/networking
> with restart does not do any thing.
> It does not work and neither does it start.Is it ia problem with Ubuntu 10.04
> that service utility does not work properly?
> 

https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/440179
[service fails to start/stop/restart networking daemon]

'service' uses the networking script in /etc/init.d (see 'man service').
http://manpages.ubuntu.com/manpages/maverick/en/man8/service.8.html
But if the script in /etc/init.d isn't working, service won't either.

:/etc/init.d$ cat networking
...
echo "Usage: /etc/init.d/networking {start|stop|restart|force-reload}"

$ sudo /etc/init.d/networking stop
 * Deconfiguring network interfaces...
        Ignoring unknown interface eth0=eth0.

 [ OK ]

$ ping google.com
PING google.com (74.125.224.50) 56(84) bytes of data.
64 bytes from 74.125.224.50: icmp_req=1 ttl=55 time=12.2 ms
^C64 bytes from 74.125.224.50: icmp_req=2 ttl=55 time=12.2 ms

$ ifconfig
eth0      Link encap:Ethernet  HWaddr <snipped>
          inet addr:192.168.4.100  Bcast:192.168.4.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:f1ff:feba:291f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15225 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5227 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:20636221 (20.6 MB)  TX bytes:495317 (495.3 KB)






More information about the ubuntu-users mailing list