Bug 119855 - Network services (NFS, NTP) start before card is configured by DHCPD
Summary: Network services (NFS, NTP) start before card is configured by DHCPD
Status: RESOLVED DUPLICATE of bug 140124
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Network (show other bugs)
Version: Alpha 1
Hardware: i586 All
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Christian Zoz
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-03 13:35 UTC by Juergen Mell
Modified: 2006-02-13 09:40 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Mell 2005-10-03 13:35:10 UTC
Some network services (mounting remote file systems, NTP) are obviously started
before the network card is configured corrcetly by DHCP. The start mode for the
card is 'started automatically on cable connection', the cable is connected when
the computer is booted. Both NFS and NTP cannot resolve the server name, as the
name server is only available after DHCP has configured the interface. The
computer is a (rather slow) K6-III 450 MHz with 192 MB RAM.
After the network interface is configured correctly, everything works as it should.
Comment 1 Peter Poeml 2005-10-04 14:52:31 UTC
The solution is to not start those services at boot time, but start them
after setting up the network. Right?

This can be achieved via a POST_SCRIPT in
/etc/sysconfig/network/ifcfg-*, or via a script in
/etc/sysconfig/network/if-up.d/:

root@bro ~ # cat /etc/sysconfig/network/if-up.d/dhcpd 
#!/bin/bash

case "$1" in type-wlan|wlan0|wifi0)
        sleep 2
        /etc/init.d/named reload
        /etc/init.d/dhcpd try-restart
        /etc/init.d/openvpn restart
        ;;
esac


(Any more comments, Christian?)
Comment 2 Hendrik Vogelsang 2005-10-05 09:10:50 UTC
you should rather use init style symlinks for services in

/etc/sysconfig/ifservice-<id>

like 

/etc/sysconfig/ifservice-eth0/S01ntp -> ../../../init.d/ntp
/etc/sysconfig/ifservice-eth0/K99ntp -> ../../../init.d/ntp
Comment 3 Christian Zoz 2005-10-11 08:49:55 UTC
Peter is right basiacally and Henne in detail.
Note that
 - <id> in ifservice-<id> has to be the same as in ifcfg-<id>
 - don't forget to start portmap also if a service needs it (e.g. ypbind)

To initial comment:
If STARTMODE=ifplugd we do not assume that this interface is mandatory for
booting. Therefore the network startscript does not wait until this interface is
set up. And since there is a solution (links in /etc/sysconfig/ifservice-*/ to
the service start scripts in /etc/init.d) there is nothing to fix except the
documentation.

Beside this consider using SCPM to switch between profiles with network services
and without.
Comment 4 Juergen Mell 2005-11-26 17:35:35 UTC
Now I have found the real cause for this problem: I have installed SUSE 10.1 Alpha3 (new installation) via NFS server. At least in this case (I did not test other cases) YaST will setup the network card to STARTMODE=ifplugd by _default_.
Here is what I did:
- booted from frist CD, aborted installation
- loaded network card kernel module 8139too
- started installation, selected source NFS server, setup by DHCP
- did the whole installation
- during hardware configuration accepted the defaults which were set by YaST (no changes at all)
After that card is configured to STARTMODE=ifplugd, which causes the plobelms with network services.
Comment 5 Christian Zoz 2006-02-13 09:40:56 UTC
This is not 100% a duplicate of bug 140124. But while fixing bug 140124 this problem is addressed as well.

*** This bug has been marked as a duplicate of 140124 ***