summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2006-10-06 11:22:42 +0000
committerChristian Heim <phreak@gentoo.org>2006-10-06 11:22:42 +0000
commit01f6b2b8318fd646204236e6ed4b6733f14c728b (patch)
tree9e959b903a2621ae0c7cf0ab7e9ae9d5c17dacb2
parentUpdating the PV in tarball.sh. (diff)
downloadbaselayout-vserver-01f6b2b8318fd646204236e6ed4b6733f14c728b.tar.gz
baselayout-vserver-01f6b2b8318fd646204236e6ed4b6733f14c728b.tar.bz2
baselayout-vserver-01f6b2b8318fd646204236e6ed4b6733f14c728b.zip
Merging baselayout revision 2300.
svn path=/baselayout-vserver/branches/baselayout-1_12/; revision=491
-rw-r--r--ChangeLog18
-rw-r--r--etc/rc.conf3
-rw-r--r--net-scripts/conf.d/net.example5
-rw-r--r--net-scripts/net/iwconfig.sh2
-rw-r--r--net-scripts/net/pppd.sh4
-rw-r--r--net-scripts/net/rename.sh16
-rwxr-xr-xsbin/runscript.sh22
7 files changed, 53 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index d04154a..5e77865 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,24 @@
# ChangeLog for Gentoo System Intialization ("rc") scripts
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPLv2
+ 30 Sep 2006; Roy Marples <uberlord@gentoo.org>:
+
+ Added warning about clamping MSS when running ppp on a router, #149525
+ thanks to Alin Nastac.
+
+ Punted DISPLAYMANAGER from /etc/rc.conf as it's now in /etc/conf.d/xdm
+
+ 26 Sep 2006; Roy Marples <uberlord@gentoo.org>:
+
+ Don't wait for scheduled services to restart when a service is
+ started in the background as this may tie up the calling daemon, #148700.
+
+ Give ppp at least 30 seconds to die, #147490, thanks to Alin Nastac.
+
+ 25 Sep 2006; Roy Marples <uberlord@gentoo.org>:
+
+ Don't rename bridged or bonded interfaces either, #145581.
+
19 Sep 2006; Roy Marples <uberlord@gentoo.org>:
Start scheduled services in the correct order, #148011.
diff --git a/etc/rc.conf b/etc/rc.conf
index c5f1ca7..0c137ca 100644
--- a/etc/rc.conf
+++ b/etc/rc.conf
@@ -13,9 +13,6 @@ EDITOR="/bin/nano"
#EDITOR="/usr/bin/vim"
#EDITOR="/usr/bin/emacs"
-# What display manager do you use ? [ xdm | gdm | kdm | entrance ]
-#DISPLAYMANAGER="xdm"
-
# XSESSION is a new variable to control what window manager to start
# default with X if run with xdm, startx or xinit. The default behavior
# is to look in /etc/X11/Sessions/ and run the script in matching the
diff --git a/net-scripts/conf.d/net.example b/net-scripts/conf.d/net.example
index 84cf530..cf6f648 100644
--- a/net-scripts/conf.d/net.example
+++ b/net-scripts/conf.d/net.example
@@ -478,6 +478,11 @@
# configured correctly.
#RC_NEED_ppp0="net.nas0"
+#WARNING: if MTU of the PPP interface is less than 1500 and you use this
+#machine as a router, you should add the following rule to your firewall
+#
+#iptables -I FORWARD 1 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
+
#-----------------------------------------------------------------------------
# ADSL
# For ADSL support, emerge net-dialup/rp-pppoe
diff --git a/net-scripts/net/iwconfig.sh b/net-scripts/net/iwconfig.sh
index 8d68013..e2ea762 100644
--- a/net-scripts/net/iwconfig.sh
+++ b/net-scripts/net/iwconfig.sh
@@ -452,7 +452,7 @@ iwconfig_scan() {
# Sleep if required
x="sleep_scan_${ifvar}"
- [[ -z ${!x} || ${!x} -gt 0 ]] && sleep "${!x:-1}"
+ [[ -z ${!x} || ${!x} -gt 0 ]] && sleep "${!x:-2}"
local error=true i=-1 line=
local -a mac=() essid=() enc=() qual=() mode=() freq=() chan=()
diff --git a/net-scripts/net/pppd.sh b/net-scripts/net/pppd.sh
index 83caf16..7a19185 100644
--- a/net-scripts/net/pppd.sh
+++ b/net-scripts/net/pppd.sh
@@ -227,8 +227,10 @@ pppd_stop() {
[[ ! -s ${pidfile} ]] && return 0
+ # Give pppd at least 30 seconds do die, #147490
einfo "Stopping pppd on ${iface}"
- start-stop-daemon --stop --exec /usr/sbin/pppd --pidfile "${pidfile}"
+ start-stop-daemon --stop --exec /usr/sbin/pppd \
+ --pidfile "${pidfile}" --retry 30
eend $?
}
diff --git a/net-scripts/net/rename.sh b/net-scripts/net/rename.sh
index 2331f79..4b61eb3 100644
--- a/net-scripts/net/rename.sh
+++ b/net-scripts/net/rename.sh
@@ -28,15 +28,15 @@ rename_pre_start() {
newname="rename_${ifvar}"
[[ -z ${!newname} || ${iface} == "${!newname}" ]] && return 0
- # We cannot rename vlan interfaces as /proc/net/vlan/config always
- # returns the old interface name. We don't bail out though as it's
- # not critical that the interface gets renamed.
- if [[ -d /proc/net/vlan/config ]] ; then
- if grep -q "^${iface} " /proc/net/vlan/config ; then
- eerror "Cannot rename VLAN interfaces"
- return 0
+ # We don't work on bonded, bridges, tun/tap or vlan
+ for f in bonding bridge tuntap vlan ; do
+ if is_function "${f}_exists" ; then
+ if ${f}_exists "${iface}" ; then
+ veinfo "Cannot rename a ${f} interface"
+ return 0
+ fi
fi
- fi
+ done
ebegin "Renaming \"${iface}\" to \"${!newname}\""
diff --git a/sbin/runscript.sh b/sbin/runscript.sh
index 0fdac7e..2206f7a 100755
--- a/sbin/runscript.sh
+++ b/sbin/runscript.sh
@@ -154,6 +154,15 @@ svc_start_scheduled() {
[[ ! -d "${svcdir}/scheduled/${SVCNAME}" ]] && return
local x= services=
+ # If we're being started in the background, then don't
+ # tie up the daemon that called us starting our scheduled services
+ if [[ ${IN_BACKGROUND} == "true" || ${IN_BACKGROUND} == "1" ]] ; then
+ unset IN_BACKGROUND
+ svc_start_scheduled &
+ export IN_BACKGROUND=true
+ return
+ fi
+
for x in $(dolisting "${svcdir}/scheduled/${SVCNAME}/") ; do
services="${services} ${x##*/}"
done
@@ -581,7 +590,8 @@ for arg in $* ; do
if [[ ${IN_BACKGROUND} == "true" ]] ; then
rm -rf "${svcdir}/snapshot/$$"
mkdir -p "${svcdir}/snapshot/$$"
- cp -pP "${svcdir}"/started/* "${svcdir}/snapshot/$$/"
+ cp -pP "${svcdir}"/started/* "${svcdir}"/inactive/* \
+ "${svcdir}/snapshot/$$/"
rm -f "${svcdir}/snapshot/$$/${SVCNAME}"
fi
@@ -619,14 +629,15 @@ for arg in $* ; do
restart)
svcrestart="yes"
- # We don't kill child processes if we're restarting
+ # We don't kill child processes if we're restarting
# This is especically important for sshd ....
RC_KILL_CHILDREN="no"
# Create a snapshot of started services
rm -rf "${svcdir}/snapshot/$$"
mkdir -p "${svcdir}/snapshot/$$"
- cp -pP "${svcdir}"/started/* "${svcdir}/snapshot/$$/"
+ cp -pP "${svcdir}"/started/* "${svcdir}"/inactive/* \
+ "${svcdir}/snapshot/$$/"
rm -f "${svcdir}/snapshot/$$/${SVCNAME}"
# Simple way to try and detect if the service use svc_{start,stop}
@@ -668,7 +679,10 @@ for arg in $* ; do
service_started "${SVCNAME}" && svc_start_scheduled
# Wait for services to come up
- [[ ${RC_PARALLEL_STARTUP} == "yes" ]] && wait
+ if [[ ${IN_BACKGROUND} != "true" \
+ && ${IN_BACKGROUND} != "1" ]] ; then
+ [[ ${RC_PARALLEL_STARTUP} == "yes" ]] && wait
+ fi
svcrestart="no"
;;