diff options
author | Christian Heim <phreak@gentoo.org> | 2005-12-06 12:20:56 +0000 |
---|---|---|
committer | Christian Heim <phreak@gentoo.org> | 2005-12-06 12:20:56 +0000 |
commit | 2822b80c52cd92b8472e16f890b68360af76f321 (patch) | |
tree | 7114abc8b7b33c36a42520e43c20f3b2616a0510 | |
parent | fix openvz /proc handling; cleanup (diff) | |
download | baselayout-vserver-2822b80c52cd92b8472e16f890b68360af76f321.tar.gz baselayout-vserver-2822b80c52cd92b8472e16f890b68360af76f321.tar.bz2 baselayout-vserver-2822b80c52cd92b8472e16f890b68360af76f321.zip |
Merging latest changes to the baselayout branch. This merge is based upon revision 1773.
svn path=/baselayout-vserver/branches/baselayout-1_12/; revision=159
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | ChangeLog.vserver | 15 | ||||
-rw-r--r-- | net-scripts/conf.d/net.example | 5 | ||||
-rw-r--r-- | net-scripts/net.modules.d/dhclient | 10 | ||||
-rw-r--r-- | net-scripts/net.modules.d/dhcpcd | 18 | ||||
-rwxr-xr-x | net-scripts/net.modules.d/helpers.d/dhcp | 11 | ||||
-rwxr-xr-x | net-scripts/net.modules.d/helpers.d/dhcpcd-wrapper | 4 | ||||
-rw-r--r-- | net-scripts/net.modules.d/pump | 9 | ||||
-rw-r--r-- | net-scripts/net.modules.d/udhcpc | 8 |
9 files changed, 66 insertions, 22 deletions
@@ -1,6 +1,14 @@ # ChangeLog for Gentoo System Intialization ("rc") scripts # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPLv2 + 06 Dec 2005; Roy Marples <uberlord@gentoo.org>: + + ppp documentation updated, #114551. + + 05 Dec 2005; Roy Marples <uberlord@gentoo.org>: + + Fix dhcp options, #114519. + 28 Nov 2005; Roy Marples <uberlord@gentoo.org>: Fixed fallback_routes, #113776. diff --git a/ChangeLog.vserver b/ChangeLog.vserver index e306f26..24eb8f6 100644 --- a/ChangeLog.vserver +++ b/ChangeLog.vserver @@ -1,6 +1,21 @@ # ChangeLog for Gentoo System Intialization ("rc") scripts # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPLv2 + 06 Dec 2005; Christian Heim <phreak@gentoo.org>: + Merging latest changes to the baselayout branch. This merge is based + upon revision 1773. + + ChangeLog | 8 ++++++++ + ChangeLog.vserver | 14 ++++++++++++++ + net-scripts/conf.d/net.example | 5 ++++- + net-scripts/net.modules.d/dhclient | 10 +++++++--- + net-scripts/net.modules.d/dhcpcd | 18 +++++++++++------- + net-scripts/net.modules.d/helpers.d/dhcp | 11 +++++++---- + net-scripts/net.modules.d/helpers.d/dhcpcd-wrapper | 4 +++- + net-scripts/net.modules.d/pump | 9 +++++---- + net-scripts/net.modules.d/udhcpc | 8 ++++++-- + 9 files changed, 65 insertions(+), 22 deletions(-) + 03 Dec 2005; Christian Heim <phreak@gentoo.org>: Readding check_statedir and the corresponding calls. Also adding net.lo which seems to be missing from my previous commit. diff --git a/net-scripts/conf.d/net.example b/net-scripts/conf.d/net.example index 77482b7..ec6e056 100644 --- a/net-scripts/conf.d/net.example +++ b/net-scripts/conf.d/net.example @@ -358,6 +358,9 @@ #cd /etc/init.d #ln -s net.lo net.ppp0 # +# We have to instruct ppp0 to actually use ppp +#config_ppp0=( "ppp" ) +# # Each PPP interface requires an interface to use as a "Link" #link_ppp0="/dev/ttyS0" # Most PPP links will use a serial port #link_ppp0="eth0" # PPPoE requires an ethernet interface @@ -387,7 +390,7 @@ # "debug" # Enables syslog debugging # "noauth" # Do not require the peer to authenticate itself # "defaultroute" # Make this PPP interface the default route -# "userpeerdns" # Use the DNS settings provided by PPP +# "usepeerdns" # Use the DNS settings provided by PPP # # On demand options # "demand" # Enable dial on demand diff --git a/net-scripts/net.modules.d/dhclient b/net-scripts/net.modules.d/dhclient index 37861b0..25e8d85 100644 --- a/net-scripts/net.modules.d/dhclient +++ b/net-scripts/net.modules.d/dhclient @@ -45,10 +45,12 @@ dhclient_stop() { local pid=$( < "${pidfile}" ) local ifvar=$( bash_variable "${iface}" ) - d="dhcp_${ifvar}[@]" + d="dhcp_${ifvar}" + d=" ${!d} " + [[ ${d} == " " ]] && d=" ${dhcp} " ebegin "Stopping dhclient on ${iface}" - if [[ " ${!d} " == *" release "* ]]; then + if [[ ${d} == *" release "* ]]; then local r=$( dhclient -q -r -pf "${pidfile}" \ -sf "${MODULES_DIR}/helpers.d/dhclient-wrapper" "${iface}" ) [[ ${r} == "deconfig" ]] @@ -115,9 +117,11 @@ dhclient_start() { fi d="dhcp_${ifvar}" + d=" ${!d} " + [[ ${d} == " " ]] && d=" ${dhcp} " # Send our hostname by editing cffile - if ${edit} && [[ -e ${cffile} && " ${!d} " != *" nosendhost "* ]] ; then + if ${edit} && [[ -e ${cffile} && ${d} != *" nosendhost "* ]] ; then local hname=$( hostname ) if [[ ${hname} != "(none)" && ${hname} != "localhost" ]]; then sed -i '/^[ \t]*send[ \t]*host-name[ \t]*/d' "${cffile}" diff --git a/net-scripts/net.modules.d/dhcpcd b/net-scripts/net.modules.d/dhcpcd index 9d8aa14..70a6bcc 100644 --- a/net-scripts/net.modules.d/dhcpcd +++ b/net-scripts/net.modules.d/dhcpcd @@ -52,7 +52,7 @@ dhcpcd_get_vars() { # Returns 0 (true) when a DHCP address dropped # otherwise return 1 dhcpcd_stop() { - local iface=$1 count signal pidfile="/var/run/dhcpcd-$1.pid" opts + local iface=$1 count signal pidfile="/var/run/dhcpcd-$1.pid" d [[ ! -f ${pidfile} ]] && return 0 @@ -60,9 +60,11 @@ dhcpcd_stop() { local pid=$( < "${pidfile}" ) local ifvar=$( bash_variable "${iface}" ) - opts="dhcp_${ifvar}" + d="dhcp_${ifvar}" + d=" ${!d} " + [[ ${d} == " " ]] && d=" ${dhcp} " - if [[ " ${!opts} " == *" release "* ]]; then + if [[ ${d} == *" release "* ]]; then signal="HUP" else signal="TERM" @@ -91,10 +93,12 @@ dhcpcd_start() { # Map some generic options to dhcpcd d="dhcp_${ifvar}" - [[ " ${d} " == *" nodns "* ]] && opts="${opts} -R" - [[ " ${d} " == *" nontp "* ]] && opts="${opts} -N" - [[ " ${d} " == *" nonis "* ]] && opts="${opts} -Y" - [[ " ${d} " == *" nogateway "* ]] && opts="${opts} -G" + d=" ${!d} " + [[ ${d} == " " ]] && d=" ${dhcp} " + [[ ${d} == *" nodns "* ]] && opts="${opts} -R" + [[ ${d} == *" nontp "* ]] && opts="${opts} -N" + [[ ${d} == *" nonis "* ]] && opts="${opts} -Y" + [[ ${d} == *" nogateway "* ]] && opts="${opts} -G" # We transmit the hostname by default:q if [[ " ${d} " != *" nosendhost "* && " ${opts} " != *" -h "* ]]; then diff --git a/net-scripts/net.modules.d/helpers.d/dhcp b/net-scripts/net.modules.d/helpers.d/dhcp index bfde3b1..52998ca 100755 --- a/net-scripts/net.modules.d/helpers.d/dhcp +++ b/net-scripts/net.modules.d/helpers.d/dhcp @@ -92,8 +92,11 @@ echo "${ip}" > "/var/cache/dhcp-${interface}.lease" chmod 600 "/var/cache/dhcp-${interface}.lease" d="dhcp_${ifvar}" +d=" ${!d} " +[[ ${d} == " " ]] && d=" ${dhcp} " + # Configure our default route - we only have 1 default route -if [[ " ${!d} " != *" nogateway "* ]]; then +if [[ ${d} != *" nogateway "* ]]; then for r in ${routers}; do interface_default_route "${interface}" "${r}" "${metric:-0}" && break done @@ -110,9 +113,9 @@ fi # Only setup the information we're told to # By default that's everything -[[ " ${!d} " != *" nodns "* ]] && system_dns "${interface}" -[[ " ${!d} " != *" nontp "* ]] && system_ntp "${interface}" -[[ " ${!d} " != *" nonis "* ]] && system_nis "${interface}" +[[ ${d} != *" nodns "* ]] && system_dns "${interface}" +[[ ${d} != *" nontp "* ]] && system_ntp "${interface}" +[[ ${d} != *" nonis "* ]] && system_nis "${interface}" if [[ ${RC_AUTO_INTERFACE} == "yes" ]]; then best_interface=$( select_best_interface ) diff --git a/net-scripts/net.modules.d/helpers.d/dhcpcd-wrapper b/net-scripts/net.modules.d/helpers.d/dhcpcd-wrapper index 4b4774f..f5e5a9c 100755 --- a/net-scripts/net.modules.d/helpers.d/dhcpcd-wrapper +++ b/net-scripts/net.modules.d/helpers.d/dhcpcd-wrapper @@ -31,9 +31,11 @@ ifvar=$( bash_variable "${interface}" ) if [[ ${action} == "up" ]]; then d="dhcp_${ifvar}" + d=" ${!d} " + [[ ${d} == " " ]] && d=" ${dhcp} " resolv="${statedir}/${interface}/resolv.conf" - if [[ " ${!d} " != *" nodns "* ]]; then + if [[ ${d} != *" nodns "* ]]; then search="dns_search_${ifvar}" if [[ -n ${!search} ]]; then tmp="${resolv}.$$" diff --git a/net-scripts/net.modules.d/pump b/net-scripts/net.modules.d/pump index bb8be39..5c81b2c 100644 --- a/net-scripts/net.modules.d/pump +++ b/net-scripts/net.modules.d/pump @@ -67,10 +67,11 @@ pump_start() { # Map some generic options to pump d="dhcp_${ifvar}" - [[ " ${!d} " == " " ]] && d=" ${dhcp} " - [[ " ${!d} " == *" nodns "* ]] && opts="${opts} --no-dns" - [[ " ${!d} " == *" nogateway "* ]] && opts="${opts} --no-gateway" - [[ " ${!d} " == *" nontp "* ]] && opts="${opts} --no-ntp" + d=" ${!d} " + [[ ${d} == " " ]] && d=" ${dhcp} " + [[ ${d} == *" nodns "* ]] && opts="${opts} --no-dns" + [[ ${d} == *" nogateway "* ]] && opts="${opts} --no-gateway" + [[ ${d} == *" nontp "* ]] && opts="${opts} --no-ntp" search="dns_search_${ifvar}" [[ -n ${!search} ]] && opts="${opts} --search-path='"${!search}"'" diff --git a/net-scripts/net.modules.d/udhcpc b/net-scripts/net.modules.d/udhcpc index 69598e3..a0661a0 100644 --- a/net-scripts/net.modules.d/udhcpc +++ b/net-scripts/net.modules.d/udhcpc @@ -43,8 +43,10 @@ udhcpc_stop() { local ifvar=$( bash_variable "${iface}" ) d="dhcp_${ifvar}" + d=" ${!d} " + [[ ${d} == " " ]] && d=" ${dhcp} " - if [[ " ${!d} " == *" release "* ]]; then + if [[ ${d} == *" release "* ]]; then kill -s USR2 "${pid}" &>/dev/null [[ -f "/var/cache/dhcp-${iface}.lease" ]] \ && rm "/var/cache/dhcp-${iface}.lease" @@ -75,8 +77,10 @@ udhcpc_start() { opts="${!opts}" d="dhcp_${ifvar}" + d=" ${!d} " + [[ ${d} == " " ]] && d=" ${dhcp} " - if [[ " ${!d} " != *" nosendhost "* ]]; then + if [[ " ${d} " != *" nosendhost "* ]]; then if [[ ! " ${opts}" =~ " -([hH] |-hostname=)" ]]; then local hname=$( hostname ) [[ -n ${hname} && ${hname} != "(none)" && ${hname} != "localhost" ]] \ |