From ad6d4c03929880d6b8498262420b6d4417901fa3 Mon Sep 17 00:00:00 2001 From: Christian Heim Date: Fri, 9 Dec 2005 15:30:39 +0000 Subject: Importing latest baselayout/trunk changes. This is a merge with revision 1753. svn path=/baselayout-vserver/trunk/; revision=166 --- ChangeLog | 5 +++++ ChangeLog.vserver | 16 ++++++++++++++++ net-scripts/init.d/net.lo | 9 --------- net-scripts/net.modules.d/dhclient | 8 -------- net-scripts/net.modules.d/dhcpcd | 7 ------- net-scripts/net.modules.d/helpers.d/dhcp-state | 4 +--- net-scripts/net.modules.d/iwconfig | 11 ----------- net-scripts/net.modules.d/pump | 7 ------- net-scripts/net.modules.d/udhcpc | 7 ------- net-scripts/net.modules.d/wpa_supplicant | 21 ++++----------------- 10 files changed, 26 insertions(+), 69 deletions(-) diff --git a/ChangeLog b/ChangeLog index ea2bdcd..ef5357d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for Gentoo System Intialization ("rc") scripts # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPLv2 + 09 Dec 2005; Roy Marples : + + Remove nasty undocumented backgrounding as we now support + ifplugd, netplug and wpa_supplicant-0.4.x which do much better jobs. + 08 Dec 2005; Mike Frysinger : Use getent instead of trying to read /etc/groups directly in localmount diff --git a/ChangeLog.vserver b/ChangeLog.vserver index e98b2a8..d35d6dc 100644 --- a/ChangeLog.vserver +++ b/ChangeLog.vserver @@ -1,6 +1,22 @@ # ChangeLog for Gentoo System Intialization ("rc") scripts # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPLv2 + 09 Dec 2005; Christian Heim : + Importing latest baselayout/trunk changes. This is a merge with + revision 1753. + + ChangeLog | 5 ++++ + ChangeLog.vserver | 16 ++++++++++++ + net-scripts/init.d/net.lo | 9 ------- + net-scripts/net.modules.d/dhclient | 8 ------ + net-scripts/net.modules.d/dhcpcd | 7 ------ + net-scripts/net.modules.d/helpers.d/dhcp-state | 4 --- + net-scripts/net.modules.d/iwconfig | 11 --------- + net-scripts/net.modules.d/pump | 7 ------ + net-scripts/net.modules.d/udhcpc | 7 ------ + net-scripts/net.modules.d/wpa_supplicant | 21 +++--------------- + 10 files changed, 26 insertions(+), 69 deletions(-) + 09 Dec 2005; Christian Heim : Importing latest baselayout/trunk changes. This is a merge with revision 1752. diff --git a/net-scripts/init.d/net.lo b/net-scripts/init.d/net.lo index e1eabf9..1ba02d9 100755 --- a/net-scripts/init.d/net.lo +++ b/net-scripts/init.d/net.lo @@ -57,15 +57,6 @@ variables() { eval "${MODULE}_variables() { echo \"$*\"; }" } -# void go_background(void) -# -# Setup for backgrounding network script -go_background() { - einfo "Backgrounding ..." - mark_service_inactive "net.${iface}" - exit 0 -} - # bool module_load_minimum(char *module) # # Does the minimum checking on a module - even when forcing diff --git a/net-scripts/net.modules.d/dhclient b/net-scripts/net.modules.d/dhclient index 25e8d85..4754628 100644 --- a/net-scripts/net.modules.d/dhclient +++ b/net-scripts/net.modules.d/dhclient @@ -139,14 +139,6 @@ dhclient_start() { # Stop dhclient if it's already running dhclient_stop "${iface}" - if [[ ${background} == "yes" ]]; then - eval dhclient "${opts}" -pf "${pidfile}" -q \ - -sf "${MODULES_DIR}/helpers.d/dhclient-wrapper" \ - "${iface}" &>/dev/null & - eend 0 - go_background - fi - local x=$( eval dhclient "${opts}" -1 -pf "${pidfile}" \ -sf "${MODULES_DIR}/helpers.d/dhclient-wrapper" -q "${iface}" 2>&1 ) # We just check the last 5 letters diff --git a/net-scripts/net.modules.d/dhcpcd b/net-scripts/net.modules.d/dhcpcd index 70a6bcc..12ed4c8 100644 --- a/net-scripts/net.modules.d/dhcpcd +++ b/net-scripts/net.modules.d/dhcpcd @@ -127,13 +127,6 @@ dhcpcd_start() { dhcpcd_stop "${iface}" [[ ! -d "${statedir}/${iface}" ]] && mkdir -m 0755 -p "${statedir}/${iface}" - - if [[ ${background} == "yes" ]]; then - eval dhcpcd "${opts}" "${iface}" & - eend 0 - go_background - fi - eval dhcpcd "${opts}" "${iface}" eend $? || return 1 diff --git a/net-scripts/net.modules.d/helpers.d/dhcp-state b/net-scripts/net.modules.d/helpers.d/dhcp-state index 60c5739..244fbb0 100644 --- a/net-scripts/net.modules.d/helpers.d/dhcp-state +++ b/net-scripts/net.modules.d/helpers.d/dhcp-state @@ -12,9 +12,7 @@ conf=$(add_suffix "/etc/conf.d/net") service="net.${interface}" if [[ ${action} != "up" ]]; then - if service_starting "${service}" || service_started "${service}" ; then - mark_service_inactive "${service}" - fi + service_started "${service}" && mark_service_inactive "${service}" remove_state "${interface}" false else ! service_stopping "${service}" && mark_service_started "${service}" diff --git a/net-scripts/net.modules.d/iwconfig b/net-scripts/net.modules.d/iwconfig index 53dcaa9..cd94cac 100644 --- a/net-scripts/net.modules.d/iwconfig +++ b/net-scripts/net.modules.d/iwconfig @@ -900,17 +900,6 @@ iwconfig_pre_start() { # Setup IFS incase parent script has modified it local IFS=$' '$'\n'$'\t' - if [[ ${background} == "yes" ]]; then - IN_BACKGROUND=true - iwconfig_configure "${iface}" &>/dev/null \ - && save_options "ESSID" "${ESSID}" \ - || iwconfig_defaults "${iface}" \ - && interface_down "${iface}" \ - && mark_service_stopped "net.${iface}" \ - & - go_background - fi - if iwconfig_configure "${iface}" ; then save_options "ESSID" "${ESSID}" return 0 diff --git a/net-scripts/net.modules.d/pump b/net-scripts/net.modules.d/pump index 5c81b2c..a4e8c35 100644 --- a/net-scripts/net.modules.d/pump +++ b/net-scripts/net.modules.d/pump @@ -88,13 +88,6 @@ pump_start() { # Bring up DHCP for this interface (or alias) ebegin "Running pump" - - if [[ ${background} == "yes" ]]; then - eval pump "${opts}" & - eend 0 - go_background - fi - eval pump "${opts}" eend $? || return $? diff --git a/net-scripts/net.modules.d/udhcpc b/net-scripts/net.modules.d/udhcpc index a0661a0..b9f566c 100644 --- a/net-scripts/net.modules.d/udhcpc +++ b/net-scripts/net.modules.d/udhcpc @@ -103,13 +103,6 @@ udhcpc_start() { fi fi - if [[ ${background} == "yes" ]]; then - eval udhcpc "${opts}" --script="${MODULES_DIR}/helpers.d/udhcpc-wrapper" \ - --pidfile="${pidfile}" --interface="${iface}" &>/dev/null & - eend 0 - go_background - fi - x=$( eval udhcpc "${opts}" --now --pidfile="${pidfile}" \ --interface="${iface}" \ --script="${MODULES_DIR}/helpers.d/udhcpc-wrapper" 2>&1 \ diff --git a/net-scripts/net.modules.d/wpa_supplicant b/net-scripts/net.modules.d/wpa_supplicant index 82157c9..2e0f1c4 100644 --- a/net-scripts/net.modules.d/wpa_supplicant +++ b/net-scripts/net.modules.d/wpa_supplicant @@ -165,12 +165,10 @@ wpa_supplicant_associate() { done # Spit out an appropriate error - if [[ ${background} != "yes" ]]; then - if ${action} ; then - eend 1 "Failed to configure ${iface} in the background" - else - eend 1 "Timed out" - fi + if ${action} ; then + eend 1 "Failed to configure ${iface} in the background" + else + eend 1 "Timed out" fi # exit without error with wpa_supplicant-0.4.x as we may get kickstarted @@ -280,7 +278,6 @@ wpa_supplicant_pre_start() { if [[ ${version} -gt 399 && -x ${actfile} ]]; then opts="${opts} -W -P/var/run/wpa_supplicant-${iface}.pid" action=true - [[ ${RC_PARALLEL_STARTUP} == "yes" ]] && background=no fi eval start-stop-daemon --start --exec /sbin/wpa_supplicant \ @@ -300,16 +297,6 @@ wpa_supplicant_pre_start() { eend "$?" || return 1 fi - # Background wpa_supplication if required - if [[ ${background} == "yes" ]]; then - if ! ${action} ; then - wpa_supplicant_associate "${iface}" \ - && export IN_BACKGROUND=true \ - && /etc/init.d/net.${iface} start >/dev/null & - fi - go_background - fi - eindent veinfo "Waiting for association" eend 0 -- cgit v1.2.3-65-gdbad