Package: insserv
Version: 1.14.0-2
Severity: minor

Hello,

I'm trying to add an init.d script to start a service.
The boot script depends on the network ($network facility) to operate correctly.

I've enabled bootlog in /etc/default/bootlogd to debug.

The /etc/init.d/test script content :
#!/bin/sh
### BEGIN INIT INFO
# Provides: mytest
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Init script to test network
### END INIT INFO

case "$1" in
start)

        ifconfig
        for i in 1 2 3
        do
                /sbin/mii-tool -v eth0
                ping -c1 10.2.128.1
        done

        ;;
stop)
        ;;
*)
        echo "Usage: mytest {start|stop}"
        exit 1
        ;;
esac

exit 0

Here is the boot log :
Wed Mar 30 12:00:43 2011: Setting preliminary keymap...done.
Wed Mar 30 12:00:43 2011: Activating swap...done.
Wed Mar 30 12:00:43 2011: Checking root file system...fsck from util-linux-ng 
2.17.2
Wed Mar 30 12:00:43 2011: e2fsck 1.41.12 (17-May-2010)
Wed Mar 30 12:00:43 2011: /dev/md1: clean, 30859/610800 files, 271695/2441198 
blocks
Wed Mar 30 12:00:43 2011: done.
Wed Mar 30 12:00:43 2011: Cleaning up ifupdown....
Wed Mar 30 12:00:43 2011: Setting up networking....
Wed Mar 30 12:00:43 2011: Loading kernel modules...done.
Wed Mar 30 12:00:43 2011: Setting up LVM Volume Groups  Reading all physical 
volumes.  This may take a while...
Wed Mar 30 12:00:44 2011:   Found volume group "vg01" using metadata type lvm2
Wed Mar 30 12:00:44 2011:   1 logical volume(s) in volume group "vg01" now 
active
Wed Mar 30 12:00:44 2011: .
Wed Mar 30 12:00:44 2011: Activating lvm and md swap...done.
Wed Mar 30 12:00:44 2011: Checking file systems...fsck from util-linux-ng 2.17.2
Wed Mar 30 12:00:44 2011: done.
Wed Mar 30 12:00:44 2011: Mounting local filesystems...done.
Wed Mar 30 12:00:44 2011: Activating swapfile swap...done.
Wed Mar 30 12:00:44 2011: Cleaning up temporary files....
Wed Mar 30 12:00:44 2011: Configuring network interfaces...done.
Wed Mar 30 12:00:44 2011: Cleaning up temporary files....
Wed Mar 30 12:00:44 2011: Setting console screen modes.
Wed Mar 30 12:00:44 2011: ^[]R^[[9;30]^[[14;30]Skipping font and keymap setup 
(handled by console-setup).
Wed Mar 30 12:00:44 2011: Setting up console font and keymap...done.
Wed Mar 30 12:00:44 2011: Setting kernel variables ...done.
Wed Mar 30 12:00:45 2011: INIT: Entering runlevel: 2
Wed Mar 30 12:00:45 2011: Using makefile-style concurrent boot in runlevel 2.
Wed Mar 30 12:00:45 2011: Starting enhanced syslogd: rsyslogd.
Wed Mar 30 12:00:45 2011: Starting MD monitoring service: mdadm --monitor.
Wed Mar 30 12:00:45 2011: Starting ACPI services....
Wed Mar 30 12:00:45 2011: Starting periodic command scheduler: cron.
Wed Mar 30 12:00:45 2011: Starting NTP server: ntpd.
Wed Mar 30 12:00:45 2011: Starting OpenBSD Secure Shell server: sshd.
Wed Mar 30 12:00:48 2011: eth0      Link encap:Ethernet  HWaddr 
bc:30:5b:d0:87:af  
Wed Mar 30 12:00:48 2011:           inet addr:10.2.128.4  Bcast:10.2.255.255  
Mask:255.255.128.0
Wed Mar 30 12:00:48 2011:           UP BROADCAST MULTICAST  MTU:1500  Metric:1
Wed Mar 30 12:00:48 2011:           RX packets:0 errors:0 dropped:0 overruns:0 
frame:0
Wed Mar 30 12:00:48 2011:           TX packets:0 errors:0 dropped:0 overruns:0 
carrier:0
Wed Mar 30 12:00:48 2011:           collisions:0 txqueuelen:1000 
Wed Mar 30 12:00:48 2011:           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
Wed Mar 30 12:00:48 2011:           Interrupt:16 
Wed Mar 30 12:00:48 2011: 
Wed Mar 30 12:00:48 2011: lo        Link encap:Local Loopback  
Wed Mar 30 12:00:48 2011:           inet addr:127.0.0.1  Mask:255.0.0.0
Wed Mar 30 12:00:48 2011:           inet6 addr: ::1/128 Scope:Host
Wed Mar 30 12:00:48 2011:           UP LOOPBACK RUNNING  MTU:16436  Metric:1
Wed Mar 30 12:00:48 2011:           RX packets:0 errors:0 dropped:0 overruns:0 
frame:0
Wed Mar 30 12:00:48 2011:           TX packets:0 errors:0 dropped:0 overruns:0 
carrier:0
Wed Mar 30 12:00:48 2011:           collisions:0 txqueuelen:0 
Wed Mar 30 12:00:48 2011:           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
Wed Mar 30 12:00:48 2011: 
Wed Mar 30 12:00:48 2011: eth0: no link
Wed Mar 30 12:00:48 2011:   product info: vendor 00:50:ef, model 45 rev 0
Wed Mar 30 12:00:48 2011:   basic mode:   autonegotiation enabled
Wed Mar 30 12:00:48 2011:   basic status: no link
Wed Mar 30 12:00:48 2011:   capabilities: 1000baseT-HD 1000baseT-FD 
100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
Wed Mar 30 12:00:48 2011:   advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 
10baseT-HD flow-control
Wed Mar 30 12:00:48 2011: PING 10.2.128.1 (10.2.128.1) 56(84) bytes of data.
Wed Mar 30 12:00:55 2011: 
Wed Mar 30 12:00:55 2011: --- 10.2.128.1 ping statistics ---
Wed Mar 30 12:00:55 2011: 1 packets transmitted, 0 received, 100% packet loss, 
time 0ms
Wed Mar 30 12:00:55 2011: 
Wed Mar 30 12:00:55 2011: eth0: negotiated 1000baseT-FD flow-control, link ok
Wed Mar 30 12:00:55 2011:   product info: vendor 00:50:ef, model 45 rev 0
Wed Mar 30 12:00:55 2011:   basic mode:   autonegotiation enabled
Wed Mar 30 12:00:55 2011:   basic status: autonegotiation complete, link ok
Wed Mar 30 12:00:55 2011:   capabilities: 1000baseT-HD 1000baseT-FD 
100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
Wed Mar 30 12:00:55 2011:   advertising:  1000baseT-FD 100baseTx-FD 
100baseTx-HD 10baseT-FD 10baseT-HD flow-control
Wed Mar 30 12:00:55 2011:   link partner: 1000baseT-HD 1000baseT-FD 
100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
Wed Mar 30 12:00:55 2011: PING 10.2.128.1 (10.2.128.1) 56(84) bytes of data.
Wed Mar 30 12:00:55 2011: 64 bytes from 10.2.128.1: icmp_req=1 ttl=64 
time=0.369 ms
Wed Mar 30 12:00:55 2011: 
Wed Mar 30 12:00:55 2011: --- 10.2.128.1 ping statistics ---
Wed Mar 30 12:00:55 2011: 1 packets transmitted, 1 received, 0% packet loss, 
time 0ms
Wed Mar 30 12:00:55 2011: rtt min/avg/max/mdev = 0.369/0.369/0.369/0.000 ms
Wed Mar 30 12:00:55 2011: eth0: negotiated 1000baseT-FD flow-control, link ok
Wed Mar 30 12:00:55 2011:   product info: vendor 00:50:ef, model 45 rev 0
Wed Mar 30 12:00:55 2011:   basic mode:   autonegotiation enabled
Wed Mar 30 12:00:55 2011:   basic status: autonegotiation complete, link ok
Wed Mar 30 12:00:55 2011:   capabilities: 1000baseT-HD 1000baseT-FD 
100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
Wed Mar 30 12:00:55 2011:   advertising:  1000baseT-FD 100baseTx-FD 
100baseTx-HD 10baseT-FD 10baseT-HD flow-control
Wed Mar 30 12:00:55 2011:   link partner: 1000baseT-HD 1000baseT-FD 
100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
Wed Mar 30 12:00:55 2011: PING 10.2.128.1 (10.2.128.1) 56(84) bytes of data.
Wed Mar 30 12:00:55 2011: 64 bytes from 10.2.128.1: icmp_req=1 ttl=64 
time=0.301 ms
Wed Mar 30 12:00:55 2011: 
Wed Mar 30 12:00:55 2011: --- 10.2.128.1 ping statistics ---
Wed Mar 30 12:00:55 2011: 1 packets transmitted, 1 received, 0% packet loss, 
time 0ms
Wed Mar 30 12:00:55 2011: rtt min/avg/max/mdev = 0.301/0.301/0.301/0.000 ms
Wed Mar 30 12:00:55 2011: Starting MTA: exim4.

As you can see, the script depends on the $network facility.
When script starts, the IP is configured on the network interface, so daemons 
can probably bind to it.

But network is not fully up before a few seconds (link down, and no ping).

Questions :
Is this the expected behaviour to have the IP addresses configured but no link ?
If this is expected, what is the recommended way of waiting for fully 
fonctionnal network ?
/etc/insserv.conf says "Low level networking" for $network facility. Can you 
make the comment more clear ?

Thanks in advance !
Marc


-- System Information:
Debian Release: 6.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-openvz-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages insserv depends on:
ii  libc6                         2.11.2-10  Embedded GNU C Library: Shared lib

insserv recommends no packages.

Versions of packages insserv suggests:
pn  bootchart                     <none>     (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to