From: Elan Ruusamäe Date: Thu, 19 Nov 2009 21:28:12 +0000 (+0000) Subject: - check networking very early X-Git-Tag: auto/th/dhcp-4_0_1p1-3~5 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fdhcp.git;a=commitdiff_plain;h=dc6d872513ac6d2f4202758b6d5426fa5ba164b1 - check networking very early Changed files: dhcp.init -> 1.27 dhcp6.init -> 1.11 --- diff --git a/dhcp.init b/dhcp.init index cf5b726..476cb93 100644 --- a/dhcp.init +++ b/dhcp.init @@ -10,17 +10,17 @@ # Get network config . /etc/sysconfig/network +# Check that networking is up. +if ! is_yes "${IPV4_NETWORKING}"; then + exit 0 +fi + # Get service config [ -f /etc/sysconfig/dhcpd ] && . /etc/sysconfig/dhcpd -# Check that networking is up. -if is_yes "${IPV4_NETWORKING}"; then - if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then - msg_network_down "DHCP Server" - exit 1 - fi -else - exit 0 +if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then + msg_network_down "DHCP Server" + exit 1 fi check_device_up() diff --git a/dhcp6.init b/dhcp6.init index f378ee3..64686fd 100644 --- a/dhcp6.init +++ b/dhcp6.init @@ -10,17 +10,17 @@ # Get network config . /etc/sysconfig/network +# Check that networking is up. +if ! is_yes "${IPV6_NETWORKING}"; then + exit 0 +fi + # Get service config [ -f /etc/sysconfig/dhcpd ] && . /etc/sysconfig/dhcpd -# Check that networking is up. -if is_yes "${IPV6_NETWORKING}"; then - if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then - msg_network_down "DHCP IPv6 Server" - exit 1 - fi -else - exit 0 +if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then + msg_network_down "DHCP IPv6 Server" + exit 1 fi check_device_up()