diff options
author | 2005-11-24 16:21:05 +0000 | |
---|---|---|
committer | 2005-11-24 16:21:05 +0000 | |
commit | 2b64017ce145d03bf0acaf82acf0e3059bbff028 (patch) | |
tree | 06e144c20f1c32ceab045a88feac1607b18509dc | |
parent | Fix our ChangeLog to use diffstat -n 53 (diff) | |
download | baselayout-vserver-2b64017ce145d03bf0acaf82acf0e3059bbff028.tar.gz baselayout-vserver-2b64017ce145d03bf0acaf82acf0e3059bbff028.tar.bz2 baselayout-vserver-2b64017ce145d03bf0acaf82acf0e3059bbff028.zip |
Import latest fixup for the _pre11 release (fixing several bugs). Merging revision 1629.
svn path=/baselayout-vserver/trunk/; revision=99
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | ChangeLog.vserver | 24 | ||||
-rw-r--r-- | net-scripts/conf.d/net.example | 2 | ||||
-rwxr-xr-x | net-scripts/init.d/net.lo | 2 | ||||
-rw-r--r-- | net-scripts/net.modules.d/arping | 4 | ||||
-rw-r--r-- | net-scripts/net.modules.d/dhcpcd | 2 | ||||
-rwxr-xr-x | net-scripts/net.modules.d/helpers.d/dhclient-wrapper | 3 | ||||
-rwxr-xr-x | net-scripts/net.modules.d/helpers.d/dhcp | 3 | ||||
-rw-r--r-- | net-scripts/net.modules.d/helpers.d/dhcp-state | 5 | ||||
-rwxr-xr-x | net-scripts/net.modules.d/helpers.d/dhcpcd-wrapper | 5 | ||||
-rw-r--r-- | net-scripts/net.modules.d/helpers.d/functions | 2 | ||||
-rw-r--r-- | net-scripts/net.modules.d/helpers.d/module-loader | 6 | ||||
-rw-r--r-- | net-scripts/net.modules.d/helpers.d/pppd-wrapper | 3 | ||||
-rwxr-xr-x | net-scripts/net.modules.d/helpers.d/pump-wrapper | 6 | ||||
-rwxr-xr-x | net-scripts/net.modules.d/helpers.d/udhcpc-wrapper | 3 | ||||
-rw-r--r-- | net-scripts/net.modules.d/ifconfig | 4 | ||||
-rw-r--r-- | net-scripts/net.modules.d/pppd | 8 | ||||
-rw-r--r-- | net-scripts/net.modules.d/pump | 2 |
18 files changed, 69 insertions, 26 deletions
@@ -1,6 +1,17 @@ # ChangeLog for Gentoo System Intialization ("rc") scripts # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPLv2 + 24 Nov 2005; Roy Marples <uberlord@gentoo.org>: + + ifconfig routes now work with metrics and older configs again + #113378 and #113406. + + arping now works with multiple gateways, #113402. + + pppd module now updates an emply secrets file, #113431. + + use ${svclib} instead of hardcoding /lib/rcscripts. + * baselayout-1.12.0_pre11 (23 Nov 2005) 23 Nov 2005; Roy Marples <uberlord@gentoo.org>: diff --git a/ChangeLog.vserver b/ChangeLog.vserver index 14c4de7..90ad4af 100644 --- a/ChangeLog.vserver +++ b/ChangeLog.vserver @@ -1,6 +1,30 @@ # ChangeLog for Gentoo System Intialization ("rc") scripts # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPLv2 + 24 Nov 2005; Christian Heim <phreak@gentoo.org>: + Import latest fixup for the _pre11 release (fixing several bugs). Merging + revision 1629. + + ChangeLog | 11 +++++++++++ + ChangeLog.vserver | 23 ++++++++++++++++++ + net-scripts/conf.d/net.example | 2 +- + net-scripts/init.d/net.lo | 2 +- + net-scripts/net.modules.d/arping | 4 ++-- + net-scripts/net.modules.d/dhcpcd | 2 +- + net-scripts/net.modules.d/helpers.d/dhclient-wrapper | 3 ++- + net-scripts/net.modules.d/helpers.d/dhcp | 3 ++- + net-scripts/net.modules.d/helpers.d/dhcp-state | 5 ++--- + net-scripts/net.modules.d/helpers.d/dhcpcd-wrapper | 5 +++-- + net-scripts/net.modules.d/helpers.d/functions | 2 +- + net-scripts/net.modules.d/helpers.d/module-loader | 6 ++++-- + net-scripts/net.modules.d/helpers.d/pppd-wrapper | 3 ++- + net-scripts/net.modules.d/helpers.d/pump-wrapper | 6 ++++-- + net-scripts/net.modules.d/helpers.d/udhcpc-wrapper | 3 ++- + net-scripts/net.modules.d/ifconfig | 4 ++-- + net-scripts/net.modules.d/pppd | 8 ++++---- + net-scripts/net.modules.d/pump | 2 +- + 18 files changed, 68 insertions(+), 26 deletions(-) + 23 Nov 2005; Christian Heim <phreak@gentoo.org>: baselayout folks just did a _pre11 so I'm syncing again (to 1626 this time). diff --git a/net-scripts/conf.d/net.example b/net-scripts/conf.d/net.example index ca34c8f..77482b7 100644 --- a/net-scripts/conf.d/net.example +++ b/net-scripts/conf.d/net.example @@ -283,7 +283,7 @@ # simply ensure that each ocet is zero padded and the dots are removed. # Below is an example. # -#arping_eth0="192.168.0.1 10.0.0.1" +#gateways_eth0="192.168.0.1 10.0.0.1" #config_192168000001=( "192.168.0.2/24" ) #routes_192168000001=( "default via 192.168.0.1" ) #dns_servers_192168000001=( "192.168.0.1" ) diff --git a/net-scripts/init.d/net.lo b/net-scripts/init.d/net.lo index feae34e..761966c 100755 --- a/net-scripts/init.d/net.lo +++ b/net-scripts/init.d/net.lo @@ -23,7 +23,7 @@ depend() { } # Define where our modules are -MODULES_DIR="/lib/rcscripts/net.modules.d" +MODULES_DIR="${svclib}/net.modules.d" # Some defaults background="${background:-no}" diff --git a/net-scripts/net.modules.d/arping b/net-scripts/net.modules.d/arping index 1f2323b..110d458 100644 --- a/net-scripts/net.modules.d/arping +++ b/net-scripts/net.modules.d/arping @@ -63,7 +63,7 @@ arping_start() { einfo "Pinging gateways on ${iface} for configuration" - gateways="gateways_${ifvar}" + gateways="gateways_${ifvar}[@]" if [[ -z ${!gateways} ]]; then eerror "No gateways have been defined (gateways_${ifvar}=\"...\")" return 1 @@ -71,7 +71,7 @@ arping_start() { eindent - for x in "${!gateways}"; do + for x in ${!gateways}; do vebegin "${x}" if arping_address_exists "${iface}" "${x}" ; then for i in ${x//./ } ; do diff --git a/net-scripts/net.modules.d/dhcpcd b/net-scripts/net.modules.d/dhcpcd index 8101822..50c9760 100644 --- a/net-scripts/net.modules.d/dhcpcd +++ b/net-scripts/net.modules.d/dhcpcd @@ -111,7 +111,7 @@ dhcpcd_start() { [[ -n ${!metric} && ${!metric} != "0" ]] && opts="${opts} -m ${!metric}" # Instruct dhcpcd to use our wrapper - opts="${opts} -c \"/lib/rcscripts/net.modules.d/helpers.d/dhcpcd-wrapper\"" + opts="${opts} -c \"${svcdir}/net.modules.d/helpers.d/dhcpcd-wrapper\"" # Instruct dhcpcd to create it's files in our state dir opts="${opts} -e \"${statedir}/${iface}\"" diff --git a/net-scripts/net.modules.d/helpers.d/dhclient-wrapper b/net-scripts/net.modules.d/helpers.d/dhclient-wrapper index 35f8675..d857b6c 100755 --- a/net-scripts/net.modules.d/helpers.d/dhclient-wrapper +++ b/net-scripts/net.modules.d/helpers.d/dhclient-wrapper @@ -34,7 +34,8 @@ export ntp_servers_${interface}="${new_domain_name_servers}" export nis_domain_${interface}="${new_nis_domain}" export nis_servers_${interface}="${new_nis_servers}" -/lib/rcscripts/net.modules.d/helpers.d/dhcp "${action}" +. /sbin/functions.sh +"${svclib}/net.modules.d/helpers.d/dhcp" "${action}" result="$?" [[ -e /etc/dhcp/dhclient-exit-hooks ]] \ diff --git a/net-scripts/net.modules.d/helpers.d/dhcp b/net-scripts/net.modules.d/helpers.d/dhcp index ad245f3..f22e5ce 100755 --- a/net-scripts/net.modules.d/helpers.d/dhcp +++ b/net-scripts/net.modules.d/helpers.d/dhcp @@ -7,7 +7,8 @@ action="$1" service="net.${interface}" -. /lib/rcscripts/net.modules.d/helpers.d/module-loader +. /sbin/functions.sh +. "${svclib}/net.modules.d/helpers.d/module-loader" # Bring the interface up interface_is_up "${interface}" || interface_up "${interface}" diff --git a/net-scripts/net.modules.d/helpers.d/dhcp-state b/net-scripts/net.modules.d/helpers.d/dhcp-state index 8bc2681..60c5739 100644 --- a/net-scripts/net.modules.d/helpers.d/dhcp-state +++ b/net-scripts/net.modules.d/helpers.d/dhcp-state @@ -4,9 +4,8 @@ # Contributed by Roy Marples (uberlord@gentoo.org) -MODULES_DIR="/lib/rcscripts/net.modules.d" -. /lib/rcscripts/sh/rc-services.sh -. "${MODULES_DIR}/helpers.d/functions" +. "${svclib}/sh/rc-services.sh" +. "${svclib}/net.modules.d/helpers.d/functions" conf=$(add_suffix "/etc/conf.d/net") [[ -e ${conf} ]] && source "${conf}" diff --git a/net-scripts/net.modules.d/helpers.d/dhcpcd-wrapper b/net-scripts/net.modules.d/helpers.d/dhcpcd-wrapper index 35b6f63..279a417 100755 --- a/net-scripts/net.modules.d/helpers.d/dhcpcd-wrapper +++ b/net-scripts/net.modules.d/helpers.d/dhcpcd-wrapper @@ -13,7 +13,8 @@ else action="up" fi -. /lib/rcscripts/net.modules.d/helpers.d/module-loader +. /sbin/functions.sh +. "${svclib}/net.modules.d/helpers.d/module-loader" # Map MAC address variables to interface variables macnet_pre_start "${interface}" 1>/dev/null @@ -55,6 +56,6 @@ else fi [[ -x ${exe} ]] && ( ${exe} "$@" 1>/dev/null ) -. /lib/rcscripts/net.modules.d/helpers.d/dhcp-state +. "${svclib}/net.modules.d/helpers.d/dhcp-state" # vim:ts=4 diff --git a/net-scripts/net.modules.d/helpers.d/functions b/net-scripts/net.modules.d/helpers.d/functions index 717e0e8..ba184dc 100644 --- a/net-scripts/net.modules.d/helpers.d/functions +++ b/net-scripts/net.modules.d/helpers.d/functions @@ -568,7 +568,7 @@ configure_variables() { x="" [[ -n ${option2} ]] && x="${v}_${option2}[@]" [[ -z ${!x} ]] && x="${v}_${option1}[@]" - [[ -n ${!x} ]] && eval "${v}_${ifvar}=( "${!x}" )" + [[ -n ${!x} ]] && eval "${v}_${ifvar}=( \"${!x}\" )" done done diff --git a/net-scripts/net.modules.d/helpers.d/module-loader b/net-scripts/net.modules.d/helpers.d/module-loader index 1434bbb..3fac7bf 100644 --- a/net-scripts/net.modules.d/helpers.d/module-loader +++ b/net-scripts/net.modules.d/helpers.d/module-loader @@ -4,10 +4,12 @@ # Contributed by Roy Marples (uberlord@gentoo.org) -[[ -z ${MODULES_DIR} ]] && MODULES_DIR="/lib/rcscripts/net.modules.d" +. "${svclib}/sh/rc-services.sh" + +MODULES_DIR="${svclib}/net.modules.d" . "${MODULES_DIR}/system" -. /lib/rcscripts/sh/rc-services.sh . "${MODULES_DIR}/helpers.d/functions" + conf=$(add_suffix "/etc/conf.d/net") [[ -e ${conf} ]] && source "${conf}" diff --git a/net-scripts/net.modules.d/helpers.d/pppd-wrapper b/net-scripts/net.modules.d/helpers.d/pppd-wrapper index 2e7dc54..829d0be 100644 --- a/net-scripts/net.modules.d/helpers.d/pppd-wrapper +++ b/net-scripts/net.modules.d/helpers.d/pppd-wrapper @@ -7,7 +7,8 @@ action="$1" interface="$2" export IN_BACKGROUND="true" -. /lib/rcscripts/net.modules.d/helpers.d/module-loader +. /sbin/functions.sh +. "${svclib}/net.modules.d/helpers.d/module-loader" resolv="${statedir}/${interface}/resolv.conf" if [[ ${action} == "up" ]]; then diff --git a/net-scripts/net.modules.d/helpers.d/pump-wrapper b/net-scripts/net.modules.d/helpers.d/pump-wrapper index bf76ef3..e5136e7 100755 --- a/net-scripts/net.modules.d/helpers.d/pump-wrapper +++ b/net-scripts/net.modules.d/helpers.d/pump-wrapper @@ -9,8 +9,10 @@ action="$1" interface="$2" +. /sbin/functions.sh + if [[ ${action} == "up" ]]; then - . /lib/rcscripts/net.modules.d/helpers.d/module-loader + . "${svclib}/net.modules.d/helpers.d/module-loader" # Map MAC address variables to interface variables macnet_pre_start "${interface}" 1>/dev/null @@ -25,6 +27,6 @@ if [[ ${action} == "up" ]]; then system_dns_extra "${interface}" "${statedir}/${interface}/resolv.conf" fi -. /lib/rcscripts/net.modules.d/helpers.d/dhcp-state +. "${svclib}/net.modules.d/helpers.d/dhcp-state" # vim:ts=4 diff --git a/net-scripts/net.modules.d/helpers.d/udhcpc-wrapper b/net-scripts/net.modules.d/helpers.d/udhcpc-wrapper index feb01e6..ba317e5 100755 --- a/net-scripts/net.modules.d/helpers.d/udhcpc-wrapper +++ b/net-scripts/net.modules.d/helpers.d/udhcpc-wrapper @@ -15,6 +15,7 @@ export ntp_servers_${interface}="${ntpsrv}" export nis_domain_${interface}="${nisdomain}" export nis_servers_${interface}="${nissrv}" -/lib/rcscripts/net.modules.d/helpers.d/dhcp "$@" +. /sbin/functions.sh +"${svclib}/net.modules.d/helpers.d/dhcp" "$@" # vim:ts=4 diff --git a/net-scripts/net.modules.d/ifconfig b/net-scripts/net.modules.d/ifconfig index e1b6d7d..b769215 100644 --- a/net-scripts/net.modules.d/ifconfig +++ b/net-scripts/net.modules.d/ifconfig @@ -175,7 +175,7 @@ ifconfig_del_addresses() { ifconfig_get_old_config() { local iface="$1" ifvar=$( bash_variable "$1" ) i inet6 - config="ifconfig_${ifvar}[@\]" + config="ifconfig_${ifvar}[@]" config=( "${!config}" ) config_fallback="ifconfig_fallback_${ifvar}[@]" config_fallback=( "${!config_fallback}" ) @@ -312,7 +312,7 @@ ifconfig_post_start() { fi # Add a metric if we don't have one - [[ ${x} != *" metric "* ]] && x="${x} metric ${metric}" + [[ ${x} != *" metric "* ]] && x="${x} metric ${!metric}" route add ${x} dev "${iface}" eend $? diff --git a/net-scripts/net.modules.d/pppd b/net-scripts/net.modules.d/pppd index 6777c71..bd707c8 100644 --- a/net-scripts/net.modules.d/pppd +++ b/net-scripts/net.modules.d/pppd @@ -56,10 +56,10 @@ pppd_regex_escape() { # Add/update PAP/CHAP authentication information pppd_update_secrets_file() { local filepath="$1" username="$2" remotename="$3" password="$4" - if [[ ! -f ${filepath} ]]; then - touch ${filepath} && \ - chmod 0600 ${filepath} || \ - return 1 + if [[ ! -s ${filepath} ]]; then + echo '#'client$'\t'server$'\t'secret$'\t'IP addresses > "${filepath}" \ + && chmod 0600 "${filepath}" \ + || return 1 fi #escape username and remotename, used in following sed calls diff --git a/net-scripts/net.modules.d/pump b/net-scripts/net.modules.d/pump index 5a0b3cc..6b7d86b 100644 --- a/net-scripts/net.modules.d/pump +++ b/net-scripts/net.modules.d/pump @@ -82,7 +82,7 @@ pump_start() { [[ ! -d "${statedir}/${iface}" ]] && mkdir -m 0755 -p "${statedir}/${iface}" opts="${opts} --win-client-ident --etc-dir=${statedir}/${iface}" - opts="${opts} --script /lib/rcscripts/net.modules.d/helpers.d/pump-wrapper" + opts="${opts} --script ${svcdir}/net.modules.d/helpers.d/pump-wrapper" opts="${opts} --keep-up --interface ${iface}" # Bring up DHCP for this interface (or alias) |