summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2006-09-14 11:52:58 +0000
committerChristian Heim <phreak@gentoo.org>2006-09-14 11:52:58 +0000
commit73e2bc8f8a4c1c805ad5bad977e12db08f23759d (patch)
tree9756f558ece58c3be7f13393823322cbc3eb20c7
parentMerging r2213 (diff)
downloadbaselayout-vserver-73e2bc8f8a4c1c805ad5bad977e12db08f23759d.tar.gz
baselayout-vserver-73e2bc8f8a4c1c805ad5bad977e12db08f23759d.tar.bz2
baselayout-vserver-73e2bc8f8a4c1c805ad5bad977e12db08f23759d.zip
Merging r2242.
svn path=/baselayout-vserver/branches/baselayout-1_12/; revision=471
-rw-r--r--ChangeLog12
-rw-r--r--etc/conf.d/rc2
-rw-r--r--etc/fstab2
-rw-r--r--etc/hosts2
-rw-r--r--etc/rc.conf2
-rw-r--r--net-scripts/conf.d/net.example5
-rwxr-xr-xnet-scripts/init.d/net.lo7
-rw-r--r--net-scripts/net/iproute2.sh15
-rw-r--r--net-scripts/net/pppd.sh21
-rw-r--r--net-scripts/net/wpa_supplicant.sh16
-rw-r--r--sbin/functions.sh10
-rwxr-xr-xsbin/rc6
-rwxr-xr-xtarball.sh2
13 files changed, 62 insertions, 40 deletions
diff --git a/ChangeLog b/ChangeLog
index 4ce6849..2ac08ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for Gentoo System Intialization ("rc") scripts
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPLv2
+ 06 Sep 2006; Roy Marples <uberlord@gentoo.org>:
+
+ Fix PPPoA usage, #144194 thanks to Giampaolo Tomassoni.
+
+ iproute2 netlink check has been moved to the ebuild.
+
+ When stopping a ppp link, don't remove the IP address, #145034.
+
+ 05 Sep 2006; Roy Marples <uberlord@gentoo.org>:
+
+ wpa_supplicant packet socket checks have been moved to the ebuild.
+
21 Aug 2006; Roy Marples <uberlord@gentoo.org>:
Each dhcp client now supports global options - ie dhcpcd="-a"
diff --git a/etc/conf.d/rc b/etc/conf.d/rc
index a21f110..af99bb0 100644
--- a/etc/conf.d/rc
+++ b/etc/conf.d/rc
@@ -71,7 +71,7 @@ RC_VERBOSE="no"
RC_BOOTLOG="no"
# Set to "yes" if you want to benchmark system boot with bootchart.
-# You'll need to emerge the app-benchmarks/bootchart package for this to work.
+# You'll need to emerge the app-benchmark/bootchart package for this to work.
RC_BOOTCHART="no"
diff --git a/etc/fstab b/etc/fstab
index 2b3edf5..2ba830f 100644
--- a/etc/fstab
+++ b/etc/fstab
@@ -17,7 +17,7 @@
/dev/BOOT /boot ext2 noauto,noatime 1 2
/dev/ROOT / ext3 noatime 0 1
/dev/SWAP none swap sw 0 0
-/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
+/dev/cdrom /mnt/cdrom audo noauto,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
diff --git a/etc/hosts b/etc/hosts
index 53f39d3..8a37ca5 100644
--- a/etc/hosts
+++ b/etc/hosts
@@ -9,7 +9,7 @@
# IPv4 and IPv6 localhost aliases
127.0.0.1 localhost
-::1 localhost
+::1 localhost
#
# Imaginary network.
diff --git a/etc/rc.conf b/etc/rc.conf
index b1c90e5..c5f1ca7 100644
--- a/etc/rc.conf
+++ b/etc/rc.conf
@@ -33,7 +33,7 @@ EDITOR="/bin/nano"
# Defaults depending on what you install currently include:
#
# Gnome - will start gnome-session
-# kde-<version> - will start startkde (ex: kde-3.0.2)
+# kde-<version> - will start startkde (look in /etc/X11/Sessions/)
# Xsession - will start a terminal and a few other nice apps
#XSESSION="Gnome"
diff --git a/net-scripts/conf.d/net.example b/net-scripts/conf.d/net.example
index f8c8b9a..84cf530 100644
--- a/net-scripts/conf.d/net.example
+++ b/net-scripts/conf.d/net.example
@@ -393,7 +393,8 @@
# 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
-#link_ppp0="/dev/null" # PPPoA and ISDN links should have this
+#link_ppp0="[itf.]vpi.vci" # PPPoA requires the ATM VC's address
+#link_ppp0="/dev/null" # ISDN links should have this
#link_ppp0="pty 'your_link_command'" # PPP links over ssh, rsh, etc
#
# Here you should specify what pppd plugins you want to use
@@ -401,7 +402,7 @@
# radattr, radrealms and winbind
#plugins_ppp0=(
# "pppoe" # Required plugin for PPPoE
-# "pppoa 0.8.35 vc-encaps" # Example plugin for PPPoA
+# "pppoa vc-encaps" # Required plugin for PPPoA with an option
# "capi" # Required plugin for ISDN
#)
#
diff --git a/net-scripts/init.d/net.lo b/net-scripts/init.d/net.lo
index 31ccebb..92b3851 100755
--- a/net-scripts/init.d/net.lo
+++ b/net-scripts/init.d/net.lo
@@ -855,8 +855,11 @@ iface_stop() {
continue
fi
- # Delete all the addresses for this alias
- interface_del_addresses "${i}"
+ # We don't delete ppp assigned addresses
+ if ! is_function pppd_exists || ! pppd_exists "${i}" ; then
+ # Delete all the addresses for this alias
+ interface_del_addresses "${i}"
+ fi
# Do final shut down of this alias
if [[ ${IN_BACKGROUND} != "true" \
diff --git a/net-scripts/net/iproute2.sh b/net-scripts/net/iproute2.sh
index 4642326..377dc1e 100644
--- a/net-scripts/net/iproute2.sh
+++ b/net-scripts/net/iproute2.sh
@@ -30,23 +30,16 @@ iproute2_expose() {
#
# Returns 1 if iproute2 is installed, otherwise 0
iproute2_check_installed() {
- local report="${1:-false}" installed="0"
- if [[ ! -x /sbin/ip ]] ; then
- installed="1"
- ${report} && eerror "For iproute2 support, emerge sys-apps/iproute2"
- fi
- if [[ ! -e /proc/net/netlink ]] ; then
- installed="1"
- ${report} && eerror "iproute2 requires NetLink enabled in the kernel"
- fi
- return "${installed}"
+ [[ -x /sbin/ip ]] && return 0
+ ${1:-false} && eerror "For iproute2 support, emerge sys-apps/iproute2"
+ return 1
}
# bool iproute2_exists(char *interface, bool report)
#
# Returns 1 if the interface exists, otherwise 0
iproute2_exists() {
- local e=$( ip addr show label "$1" ) report="${2:-false}"
+ local e=$(ip addr show label "$1") report="${2:-false}"
[[ -n ${e} ]] && return 0
if ${report} ; then
diff --git a/net-scripts/net/pppd.sh b/net-scripts/net/pppd.sh
index 6a630d0..83caf16 100644
--- a/net-scripts/net/pppd.sh
+++ b/net-scripts/net/pppd.sh
@@ -23,6 +23,13 @@ pppd_check_installed() {
return 0
}
+# bool pppd_exists(char *interface)
+#
+# Returns 0 if the interface is ppp controlled, otherwise 1
+pppd_exists() {
+ [[ -e /var/run/ppp-$1.pid ]]
+}
+
# bool pppd_start(char *iface)
#
# Start PPP on an interface by calling pppd
@@ -144,9 +151,11 @@ pppd_start() {
[[ ${plugin[0]} == "pppoa" ]] && plugin[0]="pppoatm"
[[ ${plugin[0]} == "capi" ]] && plugin[0]="capiplugin"
- [[ ${plugin[0]} == "rp-pppoe" ]] && opts="${opts} connect true"
- opts="${opts} plugin ${plugin[0]}.so ${plugin[@]:1}"
- [[ ${plugin[0]} == "rp-pppoe" ]] && opts="${opts} ${!link}"
+ if [[ ${plugin[0]} == "rp-pppoe" || ( ${plugin[0]} == "pppoatm" && ${!link} != '/dev/null' ) ]] ; then
+ opts="${opts} connect true plugin ${plugin[0]}.so ${plugin[@]:1} ${!link}"
+ else
+ opts="${opts} plugin ${plugin[0]}.so ${plugin[@]:1}"
+ fi
done
#Specialized stuff. Insert here actions particular to connection type (pppoe,pppoa,capi)
@@ -168,6 +177,12 @@ pppd_start() {
fi
if [[ " ${opts} " == *" plugin pppoatm.so "* ]] ; then
+ if [[ ${!link} =~ '^[ \t]*([1-9]*[0-9]\.){1,2}[1-9]*[0-9][ \t]*$' ]] ; then
+ insert_link_in_opts=0
+ else
+ ewarn "WARNING: An [itf.]vpi.vci ATM address was expected in ${link}"
+ fi
+
if [[ ! -d /proc/net/atm ]] ; then
# Load the PPPoA kernel module
if ! modprobe pppoatm ; then
diff --git a/net-scripts/net/wpa_supplicant.sh b/net-scripts/net/wpa_supplicant.sh
index eeba1f9..d3c1fb9 100644
--- a/net-scripts/net/wpa_supplicant.sh
+++ b/net-scripts/net/wpa_supplicant.sh
@@ -37,19 +37,9 @@ wpa_supplicant_expose() {
#
# Returns 0 if wpa_supplicant is installed, otherwise 1
wpa_supplicant_check_installed() {
- local report="${1:-false}" installed="0"
- if [[ ! -x /sbin/wpa_supplicant ]] ; then
- installed="1"
- ${report} && eerror "For WPA support (wpa_supplicant) support, emerge net-wireless/wpa_supplicant"
- fi
- if [[ ! -e /proc/net/packet ]] ; then
- installed="1"
- if ${report} ; then
- eerror "wpa_supplicant requires Packet Socket"
- eerror "(CONFIG_PACKET=y) enabled in the kernel"
- fi
- fi
- return "${installed}"
+ [[ -x /sbin/wpa_supplicant ]] && return 0
+ ${1:-false} && eerror "For WPA support (wpa_supplicant) support, emerge net-wireless/wpa_supplicant"
+ return 1
}
# bool wpa_supplicant_exists(char *interface)
diff --git a/sbin/functions.sh b/sbin/functions.sh
index 4aaa716..ddcc412 100644
--- a/sbin/functions.sh
+++ b/sbin/functions.sh
@@ -52,13 +52,21 @@ RC_DEFAULT_INDENT=2
#RC_DOT_PATTERN=' .'
RC_DOT_PATTERN=''
+# bool has_addon(addon)
+#
+# See if addon exists.
+#
+has_addon() {
+ [[ -e ${svclib}/addons/$1 ]]
+}
+
# void import_addon(char *addon)
#
# Import code from the specified addon if it exists
#
import_addon() {
local addon="${svclib}/addons/$1"
- if [[ -r ${addon} ]] ; then
+ if has_addon $1 ; then
source "${addon}"
return 0
fi
diff --git a/sbin/rc b/sbin/rc
index afbd6f9..94a7e96 100755
--- a/sbin/rc
+++ b/sbin/rc
@@ -272,10 +272,10 @@ then
esac
# Check udev prerequisites and kernel params
- if [ "${udev}" = "yes" ]
+ if [ "${udev}" = "yes" ] && has_addon udev
then
if get_bootparam "noudev" || \
- [ ! -x /sbin/udev -o ${devfs_automounted} = "yes" ] || \
+ [ ${devfs_automounted} = "yes" ] || \
[ "$(get_KV)" -lt "$(KV_to_int '2.6.0')" ]
then
udev="no"
@@ -283,7 +283,7 @@ then
fi
# Check devfs prerequisites and kernel params
- if [ "${devfs}" = "yes" ]
+ if [ "${devfs}" = "yes" ] && has_addon devfs
then
if get_bootparam "nodevfs" || [ "${udev}" = "yes" ]
then
diff --git a/tarball.sh b/tarball.sh
index 656697c..9df24ed 100755
--- a/tarball.sh
+++ b/tarball.sh
@@ -1,6 +1,6 @@
#!/bin/bash
export TMP="${TMP:-/tmp}"
-export V="1.12.4"
+export V="1.12.5"
export NAME="baselayout-vserver"
export DEST="${TMP}/${NAME}-${V}"