Hello community,
here is the log from the commit of package sysconfig
checked in at Wed Sep 24 17:36:43 CEST 2008.
--------
--- sysconfig/sysconfig.changes 2008-09-12 16:28:04.000000000 +0200
+++ /mounts/work_src_done/STABLE/sysconfig/sysconfig.changes 2008-09-24 15:04:03.000000000 +0200
@@ -1,0 +2,27 @@
+Wed Sep 24 15:03:21 CEST 2008 - mt@suse.de
+
+- Removed test hack from supported_on_localfs function...
+
+-------------------------------------------------------------------
+Tue Sep 23 16:55:45 CEST 2008 - mt@suse.de
+
+- version 0.71.5
+- Fixed ifup-dhcp to retain spaces DHCLIENT_VENDOR_CLASS_ID and
+ other dhcpcd option values (bnc#424356).
+- Fixed typo and improved vlan handling in is_iface_available.
+- Splitted ib interface type into ib and ibchild (e.g. ib0.8001),
+ added ib vs. ibchild handling to several functions and the
+ /etc/init.d/network script (bnc#423046).
+- Implemented a supported_on_localfs function returning whether an
+ interface is supported without a mounted remotefs (/usr on NFS)
+ and extended the resolve_iface_startorder function to support an
+ optional filter function (e.g. supported_on_localfs).
+ Changed LSB tags in /etc/init.d/network script to not to require
+ haldaemon and added localfs|remotefs filter parameter allowing to
+ split the interface handling. While boot, only localfs interfaces
+ are started now. Added network-remotefs script with separate LSB
+ tags to start the remotefs depending interfaces later (bnc#425502).
+- Corrected netconfig configuration hint comments that are written
+ to the destination files like /etc/resolv.conf (bnc#428201).
+
+-------------------------------------------------------------------
Old:
----
sysconfig-0.71.4.tar.bz2
New:
----
supported_on_localfs-no-test-hack.diff
sysconfig-0.71.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ sysconfig.spec ++++++
--- /var/tmp/diff_new_pack.C12964/_old 2008-09-24 17:35:48.000000000 +0200
+++ /var/tmp/diff_new_pack.C12964/_new 2008-09-24 17:35:48.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package sysconfig (Version 0.71.4)
+# spec file for package sysconfig (Version 0.71.5)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,7 +19,7 @@
Name: sysconfig
-Version: 0.71.4
+Version: 0.71.5
Release: 1
Summary: The sysconfig scheme
Group: System/Base
@@ -30,6 +30,7 @@
BuildRequires: sysfsutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: %name-%version.tar.bz2
+Patch0: supported_on_localfs-no-test-hack.diff
%description
This package provides the SuSE system configuration scheme.
@@ -50,6 +51,7 @@
%prep
%setup -n sysconfig-%{version}
+%patch0 -p0
%build
autoreconf --force --install
@@ -215,6 +217,7 @@
popd > /dev/null
#
%{fillup_and_insserv -fY network}
+%{fillup_and_insserv -fY network-remotefs}
%{fillup_only -dns dhcp network network}
%{fillup_only -dns config network network}
/sbin/ldconfig
@@ -230,6 +233,27 @@
%{stop_on_removal network}
%changelog
+* Wed Sep 24 2008 mt@suse.de
+- Removed test hack from supported_on_localfs function...
+* Tue Sep 23 2008 mt@suse.de
+- version 0.71.5
+- Fixed ifup-dhcp to retain spaces DHCLIENT_VENDOR_CLASS_ID and
+ other dhcpcd option values (bnc#424356).
+- Fixed typo and improved vlan handling in is_iface_available.
+- Splitted ib interface type into ib and ibchild (e.g. ib0.8001),
+ added ib vs. ibchild handling to several functions and the
+ /etc/init.d/network script (bnc#423046).
+- Implemented a supported_on_localfs function returning whether an
+ interface is supported without a mounted remotefs (/usr on NFS)
+ and extended the resolve_iface_startorder function to support an
+ optional filter function (e.g. supported_on_localfs).
+ Changed LSB tags in /etc/init.d/network script to not to require
+ haldaemon and added localfs|remotefs filter parameter allowing to
+ split the interface handling. While boot, only localfs interfaces
+ are started now. Added network-remotefs script with separate LSB
+ tags to start the remotefs depending interfaces later (bnc#425502).
+- Corrected netconfig configuration hint comments that are written
+ to the destination files like /etc/resolv.conf (bnc#428201).
* Fri Sep 12 2008 mt@suse.de
- new version 0.71.4
- Improved ifdown-dhcp script and some dhcp related functions.
++++++ supported_on_localfs-no-test-hack.diff ++++++
Index: scripts/functions
===================================================================
--- scripts/functions (Revision 1741)
+++ scripts/functions (Arbeitskopie)
@@ -252,10 +252,6 @@
local IFTYPE=${2:-$INTERFACETYPE}
test "x$IFNAME" = x && return 2
- case $IFNAME in
- eth1) return 0 ;;
- eth0) return 1 ;;
- esac
test "x$IFTYPE" = x && IFTYPE=$(get_iface_type $IFNAME)
test "x$IFTYPE" = x && IFTYPE=$(get_iface_type_from_config $IFNAME)
++++++ sysconfig-0.71.4.tar.bz2 -> sysconfig-0.71.5.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/ChangeLog new/sysconfig-0.71.5/ChangeLog
--- old/sysconfig-0.71.4/ChangeLog 2008-09-12 16:53:55.000000000 +0200
+++ new/sysconfig-0.71.5/ChangeLog 2008-09-23 16:58:24.000000000 +0200
@@ -1,4 +1,97 @@
------------------------------------------------------------------------
+r1740 | mt | 2008-09-23 16:56:18 +0200 (Tue, 23 Sep 2008) | 2 lines
+Changed paths:
+ M /trunk/VERSION
+ M /trunk/package/sysconfig.changes
+
+- version 0.71.5, updated sysconfig.changes
+
+------------------------------------------------------------------------
+r1739 | mt | 2008-09-23 16:43:38 +0200 (Tue, 23 Sep 2008) | 3 lines
+Changed paths:
+ M /trunk/scripts/ifup
+ M /trunk/scripts/ifup-bonding
+
+- Added ip link set down before adding to a bonding
+- Removed some obsolete FIXME's
+
+------------------------------------------------------------------------
+r1738 | mt | 2008-09-23 16:20:43 +0200 (Tue, 23 Sep 2008) | 2 lines
+Changed paths:
+ M /trunk/scripts/functions
+
+- Improved is_iface_available to check vlan interface type
+
+------------------------------------------------------------------------
+r1737 | mt | 2008-09-23 16:04:25 +0200 (Tue, 23 Sep 2008) | 2 lines
+Changed paths:
+ M /trunk/scripts/ifup-dhcp
+
+- Fixed typo in dhcpcd arg changes made last time
+
+------------------------------------------------------------------------
+r1736 | mt | 2008-09-23 15:40:05 +0200 (Tue, 23 Sep 2008) | 7 lines
+Changed paths:
+ M /trunk/package/sysconfig.spec.in
+ M /trunk/scripts/Makefile.am
+ M /trunk/scripts/network
+ A /trunk/scripts/network-remotefs
+
+- Added ib vs. ibchild handling to /etc/init.d/network (bnc#423046).
+- Changed LSB tags in /etc/init.d/network script to not to require
+ haldaemon and added localfs|remotefs filter parameter allowing to
+ split the interface handling. While boot, only localfs interfaces
+ are started now. Added network-remotefs script with separate LSB
+ tags to start the remotefs depending interfaces later (bnc#425502).
+
+------------------------------------------------------------------------
+r1735 | mt | 2008-09-23 15:26:40 +0200 (Tue, 23 Sep 2008) | 8 lines
+Changed paths:
+ M /trunk/scripts/functions
+
+- Fixed typo in vlan handling in the is_iface_available function.
+- Splitted ib interface type into ib and ibchild (e.g. ib0.8001),
+ added ib vs. ibchild handling to several functions
+- Implemented a supported_on_localfs function returning whether an
+ interface is supported without a mounted remotefs (/usr on NFS)
+ and extended the resolve_iface_startorder function to support an
+ optional filter function (e.g. supported_on_localfs).
+
+------------------------------------------------------------------------
+r1734 | mt | 2008-09-23 14:40:17 +0200 (Tue, 23 Sep 2008) | 3 lines
+Changed paths:
+ M /trunk/scripts/ifup-dhcp
+
+- Fixed ifup-dhcp to retain spaces DHCLIENT_VENDOR_CLASS_ID and
+ other dhcpcd option values (bnc#424356).
+
+------------------------------------------------------------------------
+r1733 | mt | 2008-09-23 11:53:31 +0200 (Tue, 23 Sep 2008) | 2 lines
+Changed paths:
+ M /trunk/scripts/ifup
+
+- Removed obsolete FIXMEs
+
+------------------------------------------------------------------------
+r1732 | mt | 2008-09-23 11:06:48 +0200 (Tue, 23 Sep 2008) | 2 lines
+Changed paths:
+ M /trunk/scripts/functions.netconfig
+
+- Added author
+
+------------------------------------------------------------------------
+r1731 | mt | 2008-09-22 16:49:51 +0200 (Mon, 22 Sep 2008) | 3 lines
+Changed paths:
+ M /trunk/scripts/netconfig.d/dns-bind
+ M /trunk/scripts/netconfig.d/dns-dnsmasq
+ M /trunk/scripts/netconfig.d/dns-resolver
+ M /trunk/scripts/netconfig.d/nis
+ M /trunk/scripts/netconfig.d/ntp-runtime
+
+- Corrected netconfig comments that are written to the
+ destination files like /etc/resolv.conf (bnc#428201).
+
+------------------------------------------------------------------------
r1729 | mt | 2008-09-12 16:44:00 +0200 (Fri, 12 Sep 2008) | 2 lines
Changed paths:
M /trunk/scripts/ifup-dhcp
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/configure new/sysconfig-0.71.5/configure
--- old/sysconfig-0.71.4/configure 2008-09-12 16:53:39.000000000 +0200
+++ new/sysconfig-0.71.5/configure 2008-09-23 16:57:18.000000000 +0200
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.in Revision: 1.13 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for sysconfig 0.71.4.
+# Generated by GNU Autoconf 2.61 for sysconfig 0.71.5.
#
# Report bugs to http://www.suse.de/feedback/.
#
@@ -729,8 +729,8 @@
# Identity of this package.
PACKAGE_NAME='sysconfig'
PACKAGE_TARNAME='sysconfig'
-PACKAGE_VERSION='0.71.4'
-PACKAGE_STRING='sysconfig 0.71.4'
+PACKAGE_VERSION='0.71.5'
+PACKAGE_STRING='sysconfig 0.71.5'
PACKAGE_BUGREPORT='http://www.suse.de/feedback/'
ac_unique_file="scripts/ifup"
@@ -1406,7 +1406,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures sysconfig 0.71.4 to adapt to many kinds of systems.
+\`configure' configures sysconfig 0.71.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1476,7 +1476,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of sysconfig 0.71.4:";;
+ short | recursive ) echo "Configuration of sysconfig 0.71.5:";;
esac
cat <<\_ACEOF
@@ -1579,7 +1579,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-sysconfig configure 0.71.4
+sysconfig configure 0.71.5
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1593,7 +1593,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by sysconfig $as_me 0.71.4, which was
+It was created by sysconfig $as_me 0.71.5, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -21217,7 +21217,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by sysconfig $as_me 0.71.4, which was
+This file was extended by sysconfig $as_me 0.71.5, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21264,7 +21264,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-sysconfig config.status 0.71.4
+sysconfig config.status 0.71.5
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/package/sysconfig.spec.in new/sysconfig-0.71.5/package/sysconfig.spec.in
--- old/sysconfig-0.71.4/package/sysconfig.spec.in 2008-08-25 15:46:34.000000000 +0200
+++ new/sysconfig-0.71.5/package/sysconfig.spec.in 2008-09-23 15:37:32.000000000 +0200
@@ -214,6 +214,7 @@
popd > /dev/null
#
%{fillup_and_insserv -fY network}
+%{fillup_and_insserv -fY network-remotefs}
%{fillup_only -dns dhcp network network}
%{fillup_only -dns config network network}
/sbin/ldconfig
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/scripts/functions new/sysconfig-0.71.5/scripts/functions
--- old/sysconfig-0.71.4/scripts/functions 2008-09-12 16:10:54.000000000 +0200
+++ new/sysconfig-0.71.5/scripts/functions 2008-09-23 16:20:44.000000000 +0200
@@ -21,8 +21,9 @@
#
# Authors: Michal Svec
# Mads Martin Joergensen
+# Marius Tomaschewski
#
-# $Id: functions 1725 2008-09-12 14:10:53Z mt $
+# $Id: functions 1738 2008-09-23 14:20:43Z mt $
#
. /etc/sysconfig/network/scripts/functions.common
@@ -78,21 +79,37 @@
echo ${octet[1]}.${octet[2]}.${octet[3]}.${octet[4]}
}
+add_to_wordlist() {
+ local v="${1}"
+ local l=(${!v}) ; shift
+ local a w
+ for a in ${@} ; do
+ for w in ${l[@]} ; do
+ [ "x$w" = "x$a" ] && \
+ continue 2
+ done
+ l=(${l[@]} $a)
+ done
+ eval "$v='${l[@]}'"
+}
+
is_iface_available () {
- test -z "$1" && return 1
- test -d /sys/class/net/$1 && return 0
- case $1 in
- ippp*|isdn*|modem*|dsl*|ppp*) return 0 ;;
- ipip*|sit*|gre*|tun*|tap*) return 0 ;;
- ib.*|vlan) return 0 ;;
+ local IFNAME=${1}
+ local IFTYPE=${2:-$INTERFACETYPE}
+ test -z "$IFNAME" && return 1
+ test -d /sys/class/net/$IFNAME && return 0
+ case $IFNAME in
+ ippp*|isdn*|modem*|dsl*|ppp*) return 0 ;;
+ ipip*|sit*|gre*|tun*|tap*) return 0 ;;
+ ib*.*|vlan*) return 0 ;;
esac
test "${SCRIPTNAME%%-*}" = ifdown -a \
- "$MODE" = hotplug && return 0
+ "$MODE" = hotplug && return 0
test "${SCRIPTNAME%%-*}" = ifup && \
- case $INTERFACETYPE in
- bond|bridge) return 0 ;;
+ case ${IFTYPE:-$(get_iface_type $IFNAME)} in
+ bond|bridge|vlan|ibchild) return 0 ;;
esac
- test -d /sys/class/net/$1
+ test -d /sys/class/net/$IFNAME
}
is_iface_up () {
@@ -141,7 +158,11 @@
}
;;
24) TYPE=eth ;; # firewire ;; # IEEE 1394 IPv4 - RFC 2734
- 32) TYPE=ib ;; # InfiniBand
+ 32) # InfiniBand
+ case $IF in
+ *.*) TYPE=ibchild ;; *) TYPE=ib ;;
+ esac
+ ;;
512) TYPE=ppp ;;
768) TYPE=ipip ;; # IPIP tunnel
769) TYPE= ;; # IP6IP6 tunnel
@@ -182,7 +203,7 @@
test "${!VARIABLE}" == "$VALUE" && break
fi
done <<- EOL
- INTERFACETYPE _not_empty_
+ INTERFACETYPE _not_empty_
WIRELESS yes wlan
WIRELESS_MODE _not_empty_ wlan
BONDING_MASTER yes bond
@@ -201,6 +222,10 @@
ENCAP syncppp isdn
ENCAP rawip isdn
EOL
+ case "$IF" in
+ ib*.*) INTERFACETYPE=ibchild ;;
+ ib*) INTERFACETYPE=ib ;;
+ esac
test -n "$INTERFACETYPE" && echo $INTERFACETYPE && return
if [ -z "$TYPE" ] ; then
case $IF in
@@ -214,6 +239,41 @@
test -n "$TYPE" && echo $TYPE || echo eth
}
+#
+# supported_on_localfs($INTERFACE [, $INTERFACETYPE])
+#
+# Returns 0 (true) when we support to start the interface
+# (configuration) on local-fs only, or 1 (false) when
+# also remote-fs is required (e.g. because of utilities
+# in /usr that may be on NFS) or 2 (false) on errors.
+#
+supported_on_localfs() {
+ local IFNAME=$1
+ local IFTYPE=${2:-$INTERFACETYPE}
+
+ test "x$IFNAME" = x && return 2
+ case $IFNAME in
+ eth1) return 0 ;;
+ eth0) return 1 ;;
+ esac
+ test "x$IFTYPE" = x && IFTYPE=$(get_iface_type $IFNAME)
+ test "x$IFTYPE" = x && IFTYPE=$(get_iface_type_from_config $IFNAME)
+
+ # Currently it is sufficient to check the type only.
+ local result=1 # remote-fs requirement as default
+ case $IFTYPE in
+ "") result=2 ;;
+ lo) result=0 ;;
+ eth|tr) result=0 ;;
+ ib|ibchild) result=0 ;;
+ vlan|bridge|bond) result=0 ;;
+ esac
+ # tunnels in principle too, but it may be not possible
+ # to resolve the base / slave interface correctly ...
+ #tun|tap|sit|gre|ipip) result=0 ;;
+ return $result
+}
+
get_hwaddress () {
cat /sys/class/net/$1/address >/dev/null
}
@@ -264,6 +324,10 @@
get_slaves () {
local ret=1
+ local v vv
+ case $1 in
+ ib*.*) echo -n "${1%%\.*} " ; ret=0 ;;
+ esac
for v in BONDING_SLAVE ETHERDEVICE TUNNEL_DEVICE \
TUNNEL_LOCAL_INTERFACE BRIDGE_PORTS; do
get_variable $v $1
@@ -388,7 +452,7 @@
MODFILE=$RUN_FILES_BASE/tmp/$PFX$NAME.$$ # MODFILE
TMPFILE=$RUN_FILES_BASE/tmp/$PFX$NAME.$$.tmp # MODFILE
test -f $MODFILE || cp $FILE $MODFILE 2>/dev/null
- FILE=$MODFILE # MODFILE
+ FILE=$MODFILE # MODFILE
touch $FILE
if [ -s "$FILE" ] ; then
while IFS== read a b; do
@@ -478,7 +542,7 @@
# Currently it checks only for vlan and bonding interfaces.
# FIXME: Add other types of interfaces that depend on others.
get_depending_ifaces() {
- local VLAN_PATH BOND_PATH DEP_IFACES DEP_VLANS DEP_BONDS BASE_IFACE
+ local VLAN_PATH BOND_PATH DEP_IFACES DEP_VLANS DEP_BONDS BASE_IFACE i
VLAN_PATH="/proc/net/vlan"
BOND_PATH="/proc/net/bonding"
BASE_IFACE="$1"
@@ -501,6 +565,19 @@
DEP_IFACES="$DEP_IFACES${DEP_BONDS:+ $DEP_BONDS}"
fi
+ case $BASE_IFACE in
+ (ib*.*) ;;
+ (ib*) # the infiniband children -- is there a better way?
+ for i in `ls -1 /sys/class/net/ 2>/dev/null` ; do
+ test -d /sys/class/net/$i || continue
+ case $i in (${BASE_IFACE}.*)
+ DEP_IFACES="${DEP_IFACES}${i:+ $i}"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
if [ -z "$DEP_IFACES" ]; then
return 1
else
@@ -512,62 +589,102 @@
resolve_iface_startorder()
{
#
+ # resolve_iface_startorder <name of the result variable>
+ # <list of interfaces to resolve>
+ # [ <skip list> [filter fuction] ]
#
# This function creates a start ordered list of virtual interfaces
# as bondings, vlans and bridges known by the get_slaves() function.
# It reads the base or "slave" interfaces of each virtual interface
# recursively and inserts the slaves into the result list before the
# virtual interface itself. Further it detects interface usage loops
- # like: interface a needs b that needs a.
+ # like: interface "a" needs "b" and "b" needs "a" and skips them.
+ #
# The optional skip list allows to stop the recursion insertion at
# e.g. already started / existing physical slave interfaces.
+ # Addding interfaces to resolve to this skip list causes resolving
+ # of the recursive list of slave interfaces without the requested
+ # interfaces themself (resolve_iface_startorder slaves "br0" "br0").
+ #
+ # The optional filter function allows to filter out interfaces as
+ # well as all depending interfaces. For example a vlan interface
+ # will be filtered out, when the underlying interface gets filtered
+ # out. This happens also, when the function does not cause to filter
+ # out the vlan interface directly. Main purpose is to filter out
+ # interfaces, that are not supported without a mounted remotefs.
#
# $1: the name of the result start ordered list variable to set
# $2: list of virtual interfaces to resolve the start order for
- # $3: list of (physical) slave interfaces to skip/stop reading
+ # $3: optional list of interfaces to skip/stop reading
+ # $4: optional (white list) filter function returning true for
+ # acceptable interfaces and false to filter out an interface.
#
# returns 0 on success,
# 1 on empty result list name,
- # 2 on interface usage loop error
+ # [2 on interface usage loop error; disabled]
#
local NAME="$1"
local TODO="$2"
local SKIP="$3"
- local LIST=''
+ local FUNC="$4"
+ local LIST=()
_resolve_iface_startorder() {
- local GUARD="$1"
- local TODO="$2"
- local SKIP="$3"
- local slaves iface i
- for iface in $TODO ; do
- for i in $GUARD ; do
- [ "x$i" = "x$iface" ] && {
+ local todo="$1"
+ local skip="$2"
+ local func="$3"
+ local guard="$4"
+ local level="$5"
+ local slaves iface i ret
+ local result=0
+ for iface in ${todo} ; do
+ for i in ${guard} ; do
+ if [ "x${i}" = "x${iface}" ] ; then
err_mesg "Interface dependency loop " \
- "detected: $GUARD $iface"
+ "detected: ${guard} ${iface}"
+ # guard non-empty in level > 0
return 2
- }
- done
- for i in $LIST $SKIP ; do
- [ "x$i" = "x$iface" ] && continue 2
+ fi
done
- slaves="`get_slaves $iface`"
- [ $? = 0 ] || continue 2
+ if [ "x$func" != x ] && ! $func "$iface" &>/dev/null ; then
+ [ $level -eq 0 ] && continue || return 3
+ fi
+
+ slaves=(`get_slaves $iface 2>/dev/null`)
+ if [ $? = 0 -a ${#slaves[@]} -gt 0 ] ; then
+ ret=0
+ _resolve_iface_startorder \
+ "${slaves[@]}" \
+ "${skip}" \
+ "${func}" \
+ "${guard} $iface" \
+ $(($level+1)) \
+ || ret=$?
+ if [ $ret -ne 0 ] ; then
+ if [ $level -eq 0 ] ; then
+ #result=$ret
+ continue
+ else
+ return $ret
+ fi
+ fi
+ fi
- _resolve_iface_startorder "$GUARD $iface" \
- "$slaves" "$SKIP" || return $?
+ for i in ${LIST[@]} ${skip} ; do
+ [ "x$i" = "x$iface" ] && continue 2
+ done
- [ "x$LIST" = x ] && LIST="$iface" || LIST="$LIST $iface"
+ LIST=(${LIST[@]} $iface)
done
- return 0
+ return $result
}
[ "x$NAME" = x ] && return 1
- _resolve_iface_startorder "" "$TODO" "$SKIP" || return $?
+ _resolve_iface_startorder "$TODO" "$SKIP" "$FUNC" "" 0 || return $?
- eval "$NAME='$LIST'"
+ eval "$NAME='${LIST[@]}'"
}
nm_running () {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/scripts/functions.netconfig new/sysconfig-0.71.5/scripts/functions.netconfig
--- old/sysconfig-0.71.4/scripts/functions.netconfig 2008-09-12 16:32:22.000000000 +0200
+++ new/sysconfig-0.71.5/scripts/functions.netconfig 2008-09-23 11:06:49.000000000 +0200
@@ -15,9 +15,10 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
#
-# Author: Michael Calmer
+# Authors: Michael Calmer
+# Marius Tomaschewski
#
-# $Id: functions.netconfig 1728 2008-09-12 14:32:21Z mt $
+# $Id: functions.netconfig 1732 2008-09-23 09:06:48Z mt $
#
r=$ROOT
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/scripts/ifup new/sysconfig-0.71.5/scripts/ifup
--- old/sysconfig-0.71.4/scripts/ifup 2008-08-21 09:06:12.000000000 +0200
+++ new/sysconfig-0.71.5/scripts/ifup 2008-09-23 16:43:39.000000000 +0200
@@ -26,7 +26,7 @@
# Marius Tomaschewski
# Bjoern Jacke
#
-# $Id: ifup 1709 2008-08-21 07:06:09Z mt $
+# $Id: ifup 1739 2008-09-23 14:43:38Z mt $
#
usage () {
@@ -680,12 +680,9 @@
${OPTIONS:+-o $OPTIONS}
fi
- # FIXME: uff, cleanup it
-
if [ "$SCRIPTNAME" = ifup ] ; then
# before setting up interfaces we have to configure
# wireless NICs
- # FIXME: really without $INTERFACETYPE check ?
scripts/${SCRIPTNAME}-wireless $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS}
test "$?" -ne 0 && exit
@@ -911,11 +908,10 @@
retcode=$?
;;
none)
- # FIXME: not even ifdown? what when config is modified?
:
;;
*)
- # FIXME: move this to ifup-static script
+ # TODO: move this to ifup-static script ?
case $SCRIPTNAME in
ifup)
retcode=$R_SUCCESS
@@ -1125,7 +1121,6 @@
if [ "$SCRIPTNAME" = ifdown ] ; then
# after shutting down interfaces ifup-wireless
# has to kill the wpa daemon
- # FIXME: again without INTERFACETYPE check?
scripts/${SCRIPTNAME}-wireless $CONFIG $INTERFACE \
${OPTIONS:+-o $OPTIONS}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/scripts/ifup-bonding new/sysconfig-0.71.5/scripts/ifup-bonding
--- old/sysconfig-0.71.4/scripts/ifup-bonding 2008-08-21 08:48:28.000000000 +0200
+++ new/sysconfig-0.71.5/scripts/ifup-bonding 2008-09-23 16:43:39.000000000 +0200
@@ -20,7 +20,7 @@
# Authors: Marius Tomaschewski
# Christian Zoz
#
-# $Id: ifup-bonding 1707 2008-08-21 06:48:27Z mt $
+# $Id: ifup-bonding 1739 2008-09-23 14:43:38Z mt $
#
usage () {
@@ -248,6 +248,10 @@
BONDING_SLAVE=${!BSVAR}
[ "x$BONDING_SLAVE" = x ] && continue
+ # slave has to be down while it gets added
+ if is_iface_up $BONDING_SLAVE ; then
+ ip link set down dev $BONDING_SLAVE
+ fi
echo "+$BONDING_SLAVE" > "$sysfs_iface/bonding/slaves"
if [ "$?" -gt 0 ]; then
logerror "Could not enslave interface '$BONDING_SLAVE'"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/scripts/ifup-dhcp new/sysconfig-0.71.5/scripts/ifup-dhcp
--- old/sysconfig-0.71.4/scripts/ifup-dhcp 2008-09-12 16:44:01.000000000 +0200
+++ new/sysconfig-0.71.5/scripts/ifup-dhcp 2008-09-23 16:34:55.000000000 +0200
@@ -18,7 +18,7 @@
# Author: Christian Zoz , 2002-2006
# Peter Poeml , 2002-2006
#
-# $Id: ifup-dhcp 1729 2008-09-12 14:44:00Z mt $
+# $Id: ifup-dhcp 1737 2008-09-23 14:04:25Z mt $
#
usage () {
@@ -264,11 +264,6 @@
test "$DHCLIENT_SET_HOSTNAME" = "yes" && args="$args -HHH"
test "$DHCLIENT_SET_DEFAULT_ROUTE" != "yes" && args="$args -G"
- test -n "$DHCLIENT_TIMEOUT" && args="$args -t $DHCLIENT_TIMEOUT"
- test -n "$DHCLIENT_CLIENT_ID" && args="$args -I $DHCLIENT_CLIENT_ID"
- test -n "$DHCLIENT_VENDOR_CLASS_ID" && args="$args -i $DHCLIENT_VENDOR_CLASS_ID"
- test -n "$DHCLIENT_LEASE_TIME" && args="$args -l $DHCLIENT_LEASE_TIME"
-
# send hostname for DDNS?
case "$DHCLIENT_HOSTNAME_OPTION" in
AUTO|auto)
@@ -279,15 +274,11 @@
DHCLIENT_HOSTNAME_OPTION="$FQHOSTNAME"
;;
esac
- test -n "$DHCLIENT_HOSTNAME_OPTION" && args="$args -h $DHCLIENT_HOSTNAME_OPTION"
- # this used to be hardcoded in the dhcpcd binary, but we have reverted it in order
- # to allow innocent commandline users to use dhcpcd without calling the
- # dhcpcd-hook/ifup machinery [#85849]
+ # hardcoded in the dhcpcd binary when --netconfig is in use, but ...
args="$args -c /etc/sysconfig/network/scripts/dhcpcd-hook"
# avoid deconfiguration of the interface at startup in nfsroot case (bnc#397484)
- # TODO: make sure, it (the dhcpcd binary) deconfigures ipv4 addresses only...
test "$STARTMODE" = "nfsroot" && args="-p $args"
DHCLIENT_ARGS="$args"
@@ -296,9 +287,22 @@
test -d /var/lib/dhcpcd || mkdir -p /var/lib/dhcpcd && \
touch /var/lib/dhcpcd/dhcpcd-$INTERFACE.timestamp || return 1
+ # collect args that may contain spaces and write debug...
+ args="$args${DHCLIENT_TIMEOUT:+ -t \"$DHCLIENT_TIMEOUT\"}"
+ args="$args${DHCLIENT_CLIENT_ID:+ -I \"$DHCLIENT_CLIENT_ID\"}"
+ args="$args${DHCLIENT_VENDOR_CLASS_ID:+ -i \"$DHCLIENT_VENDOR_CLASS_ID\"}"
+ args="$args${DHCLIENT_LEASE_TIME:+ -l \"$DHCLIENT_LEASE_TIME\"}"
+ args="$args${DHCLIENT_HOSTNAME_OPTION:+ -h \"$DHCLIENT_HOSTNAME_OPTION\"}"
+ debug "Starting dhcp client: $DHCLIENT_BIN $args $INTERFACE"
+
# now start dhcpcd
- debug "Starting dhcp client: $DHCLIENT_BIN $DHCLIENT_ARGS $INTERFACE"
- $DHCLIENT_BIN $DHCLIENT_ARGS $INTERFACE /dev/null &
+ $DHCLIENT_BIN $DHCLIENT_ARGS \
+ ${DHCLIENT_TIMEOUT:+-t "$DHCLIENT_TIMEOUT"} \
+ ${DHCLIENT_CLIENT_ID:+-I "$DHCLIENT_CLIENT_ID"} \
+ ${DHCLIENT_VENDOR_CLASS_ID:+-i "$DHCLIENT_VENDOR_CLASS_ID"} \
+ ${DHCLIENT_LEASE_TIME:+-l "$DHCLIENT_LEASE_TIME"} \
+ ${DHCLIENT_HOSTNAME_OPTION:+-h "$DHCLIENT_HOSTNAME_OPTION"} \
+ $INTERFACE /dev/null &
}
start_dhcp4_dhclient() {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/scripts/Makefile.am new/sysconfig-0.71.5/scripts/Makefile.am
--- old/sysconfig-0.71.4/scripts/Makefile.am 2008-08-20 13:43:19.000000000 +0200
+++ new/sysconfig-0.71.5/scripts/Makefile.am 2008-09-22 18:51:48.000000000 +0200
@@ -34,7 +34,7 @@
ifup-dhcp \
netconfig
-init_d_SCRIPTS = network
+init_d_SCRIPTS = network network-remotefs
ppp_SCRIPTS = ip-up \
poll.tcpip
@@ -56,7 +56,7 @@
ln -sf ifup-dhcp $(DESTDIR)/$(sbindir)/ifdown-dhcp
ln -sf ifup-dhcp $(DESTDIR)/$(sbindir)/ifstatus-dhcp
ln -sf ifup-dhcp $(DESTDIR)/$(sbindir)/ifrenew-dhcp
- ln -sf ../etc/init.d/network $(DESTDIR)/$(sbindir)/rcnetwork
+ ln -sf /etc/init.d/network $(DESTDIR)/$(sbindir)/rcnetwork
ln -sf ifup-route $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifdown-route
ln -sf ifup-route $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifstatus-route
ln -sf ifdown-connection $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifstatus-connection
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/scripts/Makefile.in new/sysconfig-0.71.5/scripts/Makefile.in
--- old/sysconfig-0.71.4/scripts/Makefile.in 2008-09-12 16:53:40.000000000 +0200
+++ new/sysconfig-0.71.5/scripts/Makefile.in 2008-09-23 16:57:19.000000000 +0200
@@ -218,7 +218,7 @@
ifup-dhcp \
netconfig
-init_d_SCRIPTS = network
+init_d_SCRIPTS = network network-remotefs
ppp_SCRIPTS = ip-up \
poll.tcpip
@@ -663,7 +663,7 @@
ln -sf ifup-dhcp $(DESTDIR)/$(sbindir)/ifdown-dhcp
ln -sf ifup-dhcp $(DESTDIR)/$(sbindir)/ifstatus-dhcp
ln -sf ifup-dhcp $(DESTDIR)/$(sbindir)/ifrenew-dhcp
- ln -sf ../etc/init.d/network $(DESTDIR)/$(sbindir)/rcnetwork
+ ln -sf /etc/init.d/network $(DESTDIR)/$(sbindir)/rcnetwork
ln -sf ifup-route $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifdown-route
ln -sf ifup-route $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifstatus-route
ln -sf ifdown-connection $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifstatus-connection
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/scripts/netconfig.d/dns-bind new/sysconfig-0.71.5/scripts/netconfig.d/dns-bind
--- old/sysconfig-0.71.4/scripts/netconfig.d/dns-bind 2008-09-11 17:04:51.000000000 +0200
+++ new/sysconfig-0.71.5/scripts/netconfig.d/dns-bind 2008-09-22 16:41:18.000000000 +0200
@@ -75,16 +75,19 @@
#
# This file is autogenerated by netconfig!
#
-# Do not modify this file by hand. All changes will get lost.
-#
-# To define a static DNS configuration, please use the
-# /etc/sysconfig/network/config variables:
+# Before you change this file manually, consider to define the
+# static DNS configuration using the following variables in the
+# /etc/sysconfig/network/config file:
# NETCONFIG_DNS_STATIC_SEARCHLIST
# NETCONFIG_DNS_STATIC_SERVERS
# NETCONFIG_DNS_FORWARDER
-# or disable DNS configuration using netconfig by setting
+# or disable DNS configuration updates via netconfig by setting:
# NETCONFIG_DNS_POLICY=''
#
+# Note: Manual change of this file disables netconfig too, but
+# may get lost when this file contains comments or empty lines
+# only and in case of a "netconfig update -f" call.
+#
# See also the netconfig(8) manual page and other documentation.
#
EOT
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/scripts/netconfig.d/dns-dnsmasq new/sysconfig-0.71.5/scripts/netconfig.d/dns-dnsmasq
--- old/sysconfig-0.71.4/scripts/netconfig.d/dns-dnsmasq 2008-09-11 17:05:03.000000000 +0200
+++ new/sysconfig-0.71.5/scripts/netconfig.d/dns-dnsmasq 2008-09-22 16:41:33.000000000 +0200
@@ -72,16 +72,19 @@
#
# This file is autogenerated by netconfig!
#
-# Do not modify this file by hand. All changes will get lost.
-#
-# To define a static DNS configuration, please use the
-# /etc/sysconfig/network/config variables:
+# Before you change this file manually, consider to define the
+# static DNS configuration using the following variables in the
+# /etc/sysconfig/network/config file:
# NETCONFIG_DNS_STATIC_SEARCHLIST
# NETCONFIG_DNS_STATIC_SERVERS
# NETCONFIG_DNS_FORWARDER
-# or disable DNS configuration using netconfig by setting
+# or disable DNS configuration updates via netconfig by setting:
# NETCONFIG_DNS_POLICY=''
#
+# Note: Manual change of this file disables netconfig too, but
+# may get lost when this file contains comments or empty lines
+# only and in case of a "netconfig update -f" call.
+#
# See also the netconfig(8) manual page and other documentation.
#
EOT
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/scripts/netconfig.d/dns-resolver new/sysconfig-0.71.5/scripts/netconfig.d/dns-resolver
--- old/sysconfig-0.71.4/scripts/netconfig.d/dns-resolver 2008-09-11 17:05:20.000000000 +0200
+++ new/sysconfig-0.71.5/scripts/netconfig.d/dns-resolver 2008-09-22 16:41:50.000000000 +0200
@@ -77,16 +77,19 @@
#
# This file is autogenerated by netconfig!
#
-# Do not modify this file by hand. All changes will get lost.
-#
-# To define a static DNS configuration, please use the
-# /etc/sysconfig/network/config variables:
+# Before you change this file manually, consider to define the
+# static DNS configuration using the following variables in the
+# /etc/sysconfig/network/config file:
# NETCONFIG_DNS_STATIC_SEARCHLIST
# NETCONFIG_DNS_STATIC_SERVERS
# NETCONFIG_DNS_FORWARDER
-# or disable DNS configuration using netconfig by setting
+# or disable DNS configuration updates via netconfig by setting:
# NETCONFIG_DNS_POLICY=''
#
+# Note: Manual change of this file disables netconfig too, but
+# may get lost when this file contains comments or empty lines
+# only and in case of a "netconfig update -f" call.
+#
# See also the netconfig(8) manual page and other documentation.
#
EOT
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/scripts/netconfig.d/nis new/sysconfig-0.71.5/scripts/netconfig.d/nis
--- old/sysconfig-0.71.4/scripts/netconfig.d/nis 2008-09-11 17:05:40.000000000 +0200
+++ new/sysconfig-0.71.5/scripts/netconfig.d/nis 2008-09-22 16:44:38.000000000 +0200
@@ -143,15 +143,18 @@
#
# This file is autogenerated by netconfig!
#
-# Do not modify this file by hand. All changes will get lost.
-#
-# To define a static NIS configuratiopn, please use the
-# /etc/sysconfig/network/config variables:
-# NETCONFIG_NIS_STATIC_DOMAIN [_<number>]
-# NETCONFIG_NIS_STATIC_SERVERS [_<number>]
-# or disable NIS configuration using netconfig by setting
+# Before you change this file manually, consider to define the
+# static NIS configuration using the following variables in the
+# /etc/sysconfig/network/config file:
+# NETCONFIG_NIS_STATIC_DOMAIN[_<number>]
+# NETCONFIG_NIS_STATIC_SERVERS[_<number>]
+# or disable NIS configuration updates via netconfig by setting:
# NETCONFIG_NIS_POLICY=''
#
+# Note: Manual change of this file disables netconfig too, but
+# may get lost when this file contains comments or empty lines
+# only and in case of a "netconfig update -f" call.
+#
# See also the netconfig(8) manual page and other documentation.
#
EOT
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/scripts/netconfig.d/ntp-runtime new/sysconfig-0.71.5/scripts/netconfig.d/ntp-runtime
--- old/sysconfig-0.71.4/scripts/netconfig.d/ntp-runtime 2008-09-11 17:06:05.000000000 +0200
+++ new/sysconfig-0.71.5/scripts/netconfig.d/ntp-runtime 2008-09-22 16:45:25.000000000 +0200
@@ -74,14 +74,17 @@
#
# This file is autogenerated by netconfig!
#
-# Do not modify this file by hand. All changes will get lost.
-#
-# To define a static NTP configuratiopn, please use the
-# /etc/sysconfig/network/config variables:
+# Before you change this file manually, consider to define the
+# static NTP configuration using the following variables in the
+# /etc/sysconfig/network/config file:
# NETCONFIG_NTP_STATIC_SERVERS
-# or disable NIS configuration using netconfig by setting
+# or disable NTP configuration updates via netconfig by setting:
# NETCONFIG_NTP_POLICY=''
#
+# Note: Manual change of this file disables netconfig too, but
+# may get lost when this file contains comments or empty lines
+# only and in case of a "netconfig update -f" call.
+#
# See also the netconfig(8) manual page and other documentation.
#
EOT
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/scripts/network new/sysconfig-0.71.5/scripts/network
--- old/sysconfig-0.71.4/scripts/network 2008-09-12 14:15:52.000000000 +0200
+++ new/sysconfig-0.71.5/scripts/network 2008-09-23 15:40:06.000000000 +0200
@@ -22,21 +22,23 @@
# Author: Michal Svec
# Christian Zoz
# Mads Martin J�rgensen
+# Marius Tomaschewski
#
-# $Id: network 1715 2008-08-25 14:37:42Z mt $
+# $Id: network 1736 2008-09-23 13:40:05Z mt $
#
# /etc/init.d/network
#
### BEGIN INIT INFO
# Provides: network
-# Required-Start: $local_fs dbus haldaemon
+# Required-Start: $local_fs dbus
# Should-Start: isdn SuSEfirewall2_init
-# Required-Stop: $local_fs dbus haldaemon
+# Required-Stop: $local_fs dbus
# Should-Stop: isdn SuSEfirewall2_init
# Default-Start: 2 3 5
# Default-Stop:
-# Short-Description: Configure the network
-# Description: Configure the network interfaces and set up routing
+# Short-Description: Configure the localfs depending network interfaces
+# Description: Configure the localfs depending network interfaces
+# and set up routing
### END INIT INFO
. /etc/rc.status
@@ -55,8 +57,10 @@
# Only use ifup option 'onboot' if booting or changing runlevel
# Therefore we check if we were called from init
+FS_FILTER=""
if [ -n "$INIT_VERSION" ] ; then
MODE=onboot
+ FS_FILTER=localfs
fi
######################################################################
@@ -78,13 +82,15 @@
check) CHECK=check ;;
quiet) be_quiet_has_gone ;;
debug) DEBUG=yes ;;
- type*) TYPE=${1#type=} ;;
+ type=*) TYPE=${1#type=} ;;
fake) FAKE=echo ;;
- skip*) SKIP=${1#skip=} ;;
+ skip=*) SKIP=${1#skip=} ;;
nm) NETWORKMANAGER=yes ;;
netcontrol) NETWORKMANAGER=no ;;
- *) mesg "Unknown option $1"
- mesg "options: {[on]boot,hotplug,check,debug,type=<typelist>,fake}"
+ localfs) FS_FILTER=localfs ;;
+ remotefs) FS_FILTER=remotefs ;;
+ *) mesg "Unknown option '$1'"
+ mesg "options: {[on]boot,hotplug,manual,check,debug,type=<typelist>,fake,localfs,remotefs}"
exit 1 ;;
esac
shift
@@ -103,12 +109,17 @@
# /etc/sysconfig/network/scripts/functions
# because they are also used in ifup
#
-if [ ! -x "$NETWORKMANAGER_BIN" -a "$NETWORKMANAGER" == yes ] ; then
- err_mesg "NetworkManager is not installed, thus using NetControl." \
- "Please set" \
- "\n/etc/sysconfig/network/config:NetworkManager=no" \
- "or install NetworkManager."
- NETWORKMANAGER=no
+if [ "$NETWORKMANAGER" = yes ] ; then
+ if [ "$FS_FILTER" = "localfs" ] ; then
+ # skip, remote-fs required
+ NETWORKMANAGER=no
+ elif [ ! -x "$NETWORKMANAGER_BIN" ] ; then
+ NETWORKMANAGER=no
+ err_mesg "NetworkManager is not installed, thus using NetControl." \
+ "Please set" \
+ "\n/etc/sysconfig/network/config:NetworkManager=no" \
+ "or install NetworkManager."
+ fi
fi
check_firewall() {
@@ -291,10 +302,15 @@
if [ "$MODE" = onboot -a "$ACTION" = start ] ; then
- rm -f ${RUN_FILES_BASE}/if-*
- rm -f ${RUN_FILES_BASE}/ifup-*
- rm -Rf ${RUN_FILES_BASE}/tmp
- rm -f ${RUN_FILES_BASE}/route-stack-* 2>/dev/null
+ case $FS_FILTER in
+ (remotefs) ;;
+ (*) # (localfs|"")
+ rm -f ${RUN_FILES_BASE}/if-*
+ rm -f ${RUN_FILES_BASE}/ifup-*
+ rm -Rf ${RUN_FILES_BASE}/tmp
+ rm -f ${RUN_FILES_BASE}/route-stack-* 2>/dev/null
+ ;;
+ esac
fi
mkdir -p ${RUN_FILES_BASE}/tmp
@@ -328,38 +344,48 @@
fi
-
######################################################################
# Get interfaces to handle
#
# Seperate this interfaces into several sets, not all mutually exclisive;
# none of them may contain lo, because it will always handled separately
#
-# AVAILABLE_IFACES are all interfaces from /sys/class/net
-# these have to be shut down when stopping
-#
-# PHYSICAL_IFACES are interfaces to present physical devices, they will be
-# derived from AVAILABLE_IFACES
-#
-# BONDING_IFACES are bonding interfaces derived from ifcfg-* files
-#
-# VLAN_IFACES are vlan (802.1q) interfaces derived from ifcfg-* files
-#
-# DIALUP_IFACES are modemX, dslX, etc., they are derived from ifcfg-* files
+# PHYSICAL_IFACES available interfaces to present physical devices
+# (not in VIRTUAL_IFACES), that are already prepared
+# by udev rules using an "ifup -o hotplug" call.
+#
+# NOT_PHYSICAL_IFACES available interfaces that are in VIRTUAL_IFACES
+#
+# AVAILABLE_IFACES are all interfaces available at /sys/class/net
+# (that is PHYSICAL_IFACES + NOT_PHYSICAL_IFACES)
+#
+# VIRTUAL_IFACES all configured interfaces (derived from ifcfg-*
+# files), except of thoseinterfaces "known" as
+# interfaces to physical devices
+#
+# subsets of VIRTUAL_IFACES:
+# BONDING_IFACES are virtual bonding interfaces
+# BRIDGE_IFACES are virtual bridge interfaces
+# DIALUP_IFACES are virtual modemX, dslX, etc.
+# TUNNEL_IFACES are virtual tunnel interfaces
+# VLAN_IFACES are virtual vlan (802.1q) interfaces
+#
+# MANDATORY_DEVICES interfaces specified in global network/config or
+# interfaces (to physical devices) that are not in
+# the VIRTUAL_IFACES set.
+# in boot mode, the script waits up to the limit
+# of $WAIT_FOR_INTERFACES seconds to become ready.
+#
+# MANDATORY_SLAVES all interfaces that are slave/base interfaces for
+# virtual interfaces and not virtual themself.
+#
+# The PHYSICAL and NOT_PHYSICAL interfaces sets are mutually exclusive.
+# Their union contains AVAILABLE and MANDATORY and all of them have to
+# be set up when starting.
#
-# BRIDGE_IFACES are bridge interfaces derived from ifcfg-* files
-#
-# TUNNEL_IFACES are interfaces that do not fit into PHYSICAL, BONDING,
-# VLAN, DIALUP or BRIDGE and are as well derived from
-# ifcfg-* files
-#
-# The PHYSICAL, BONDING, DIALUP, TUNNEL and BRIDGE interfaces sets are
-# mutually exclusive. Their union contains AVAILABLE and MANDATORY and
-# all of them have to be set up when starting.
-#
-# The MANDATORY_IFACES must be up and well configured for success.
-# At first sort into BONDING, DIALUP, TUNNEL and BRIDGE interface sets.
+# At first sort into VIRTUAL interface set and the subsets BONDING,
+# BRIDGE, DIALUP, TUNNEL and VLAN.
while IFS=- read a b; do
case "$b" in
""|*~|*.old|*.rpmnew|*.rpmsave|*.scpmbackup)
@@ -367,28 +393,36 @@
;;
esac
b=`type_filter $b`
- case "`get_iface_type_from_config $b`" in
- lo|eth|tr|wlan|irda|ip6tnl|mip6mnha)
+ t=`get_iface_type_from_config $b`
+ case $t in
+ lo|eth|ib|tr|wlan|irda|ip6tnl|mip6mnha)
continue
- ;;
+ ;;
bond)
BONDING_IFACES="$BONDING_IFACES $b"
- ;;
- vlan)
- VLAN_IFACES="$VLAN_IFACES $b"
- ;;
+ add_to_wordlist VIRTUAL_IFACES $b
+ ;;
+ bridge)
+ BRIDGE_IFACES="$BRIDGE_IFACES $b"
+ add_to_wordlist VIRTUAL_IFACES $b
+ ;;
*ppp|dsl|modem|isdn)
DIALUP_IFACES="$DIALUP_IFACES $b"
- ;;
+ add_to_wordlist VIRTUAL_IFACES $b
+ ;;
+ vlan|ibchild)
+ VLAN_IFACES="$VLAN_IFACES $b"
+ add_to_wordlist VIRTUAL_IFACES $b
+ ;;
ipip|sit|gre|tun|tap)
TUNNEL_IFACES="$TUNNEL_IFACES $b"
- ;;
- bridge)
- BRIDGE_IFACES="$BRIDGE_IFACES $b"
- ;;
+ add_to_wordlist VIRTUAL_IFACES $b
+ ;;
*)
+ add_to_wordlist VIRTUAL_IFACES $b
+
err_mesg "$b has unknown interface type. Please file a bug report."
- ;;
+ ;;
esac
done < <(ls -1d /etc/sysconfig/network/ifcfg-*)
@@ -402,10 +436,16 @@
# later in the start section if it is considered mandatory (see next section).
for a in $(type_filter `ls -A /sys/class/net/`); do
test -d /sys/class/net/$a || continue
- case "`get_iface_type $a`" in
- eth|tr|wlan)
+ t=`get_iface_type $a`
+ case "$t" in
+ eth|tr|ib|wlan)
STAMPFILE=$STAMPFILE_STUB`cat /sys/class/net/$a/ifindex`
if [ "$MODE" == onboot -a "$ACTION" == start ] ; then
+ # skip interfaces (with active drivers)
+ # but not yet prepared by an
+ # ifup -o hotplug
+ # call is triggered in udev rules.
+ # (may need rename to their final name)
if [ ! -e "$STAMPFILE" ] ; then
continue
fi
@@ -415,21 +455,14 @@
continue
;;
esac
- for b in $BONDING_IFACES $VLAN_IFACES $DIALUP_IFACES $TUNNEL_IFACES $BRIDGE_IFACES; do
+ for b in $VIRTUAL_IFACES ; do
if [ "$a" = "$b" ] ; then
NOT_PHYSICAL_IFACES="$NOT_PHYSICAL_IFACES $a"
continue 2
fi
done
- case $a in
- sit*)
- NOT_PHYSICAL_IFACES="$NOT_PHYSICAL_IFACES $a"
- continue 2
- ;;
- esac
PHYSICAL_IFACES="$PHYSICAL_IFACES $a"
done
-AVAILABLE_IFACES="$NOT_PHYSICAL_IFACES $PHYSICAL_IFACES"
# mandatory interfaces may be specified in /etc/sysconfig/network/config
# If $MANDATORY_DEVICES is empty we take all PHYSICAL_IFACES, which are
@@ -451,19 +484,21 @@
on|boot|onboot|auto|ifplugd) : ;;
*) continue ;;
esac
- for d in $DIALUP_IFACES; do
+ for d in $DIALUP_IFACES ; do
if [ "$b" = "$d" ] ; then
continue 2
fi
done
- for d in $BONDING_IFACES $VLAN_IFACES $TUNNEL_IFACES $BRIDGE_IFACES; do
+ for d in $VIRTUAL_IFACES ; do
if [ "$b" = "$d" ] ; then
- slaves="`get_slaves $b`"
+ #slaves="`get_slaves $b`"
+ # resolve all slaves recursively
+ slaves=""
+ resolve_iface_startorder slaves "$b" "$b"
test $? = 0 || continue 2
for s in $slaves ; do
- for v in $SLAVE_IFACES $BONDING_IFACES \
- $VLAN_IFACES $DIALUP_IFACES \
- $TUNNEL_IFACES $BRIDGE_IFACES ; do
+ for v in $SLAVE_IFACES $VIRTUAL_IFACES ;
+ do
[ "$v" = "$s" ] && continue 2
done
SLAVE_IFACES="$SLAVE_IFACES $s"
@@ -491,12 +526,111 @@
# find out the start order of non-physical & non-mandatory
# interfaces resolving their slave interfaces recursively
#
-START_VIFACES=""
-resolve_iface_startorder START_VIFACES \
- "$BONDING_IFACES $VLAN_IFACES $DIALUP_IFACES $TUNNEL_IFACES $BRIDGE_IFACES" \
- "$PHYSICAL_IFACES $MANDATORY_DEVICES $MANDATORY_SLAVES"
+filter_wordlist() {
+ local fwv="${1}"
+ local fwf="${2}"
+ local fwl=""
+ local fwi
+ test "x$fwv" != x -a \
+ "x$fwf" != x || return 1
+ for fwi in ${!fwv} ; do
+ $fwf $fwi || continue
+ add_to_wordlist fwl $fwi
+ done
+ eval "${fwv}='${fwl}'"
+ return 0
+}
+
+bw_fs_filter()
+{
+ local filter=$1 ; shift
+ local w_list=$1 ; shift
+ local b_list=$1 ; shift
+ local i
+ test "x$filter" != x -a \
+ "x$w_list" != x -a \
+ "x$b_list" != x || return 1
+ for i in $@ ; do
+ $filter $i && \
+ add_to_wordlist ${w_list} $i || \
+ add_to_wordlist ${b_list} $i
+ done
+ return 0
+}
+
+filter_first=0
+if test $filter_first -eq 0 -a "x$FS_FILTER" != x ; then
+ #
+ # Filter interfaces into a localfs and remotefs sets
+ #
+ ALL_PHYSICAL_IFACES="$PHYSICAL_IFACES"
+ bw_fs_filter supported_on_localfs \
+ LFS_PHYSICAL_IFACES \
+ RFS_PHYSICAL_IFACES \
+ $ALL_PHYSICAL_IFACES
+
+ ALL_NOT_PHYSICAL_IFACES="$NOT_PHYSICAL_IFACES"
+ bw_fs_filter supported_on_localfs \
+ LFS_NOT_PHYSICAL_IFACES \
+ RFS_NOT_PHYSICAL_IFACES \
+ $ALL_NOT_PHYSICAL_IFACES
+
+ ALL_MANDATORY_DEVICES="$MANDATORY_DEVICES"
+ bw_fs_filter supported_on_localfs \
+ LFS_MANDATORY_DEVICES \
+ RFS_MANDATORY_DEVICES \
+ $ALL_MANDATORY_DEVICES
+
+ ALL_MANDATORY_SLAVES="$MANDATORY_SLAVES"
+ bw_fs_filter supported_on_localfs \
+ LFS_MANDATORY_SLAVES \
+ RFS_MANDATORY_SLAVES \
+ $ALL_MANDATORY_SLAVES
+
+ ALL_VIRTUAL_IFACES=$VIRTUAL_IFACES
+ resolve_iface_startorder LFS_VIRTUAL_IFACES \
+ "$ALL_VIRTUAL_IFACES" \
+ "$LFS_PHYSICAL_IFACES $LFS_MANDATORY_DEVICES $LFS_MANDATORY_SLAVES" \
+ supported_on_localfs
+ for i in $ALL_VIRTUAL_IFACES ; do
+ for l in $LFS_VIRTUAL_IFACES ; do
+ test "x$i" = "x$l" && continue 2
+ done
+ add_to_wordlist RFS_VIRTUAL_IFACES $i
+ done
+
+ debug "* Modifications by $FS_FILTER filter:"
+ debug "PHYSICAL_IFACES => $LFS_PHYSICAL_IFACES + $RFS_PHYSICAL_IFACES = $ALL_PHYSICAL_IFACES"
+ debug "NOT_PHYSICAL_IFACES => $LFS_NOT_PHYSICAL_IFACES + $RFS_NOT_PHYSICAL_IFACES = $ALL_NOT_PHYSICAL_IFACES"
+ debug "MANDATORY_DEVICES => $LFS_MANDATORY_DEVICES + $RFS_MANDATORY_DEVICES = ALL_MANDATORY_DEVICES"
+ debug "MANDATORY_SLAVES => $LFS_MANDATORY_SLAVES + $RFS_MANDATORY_SLAVES = $ALL_MANDATORY_SLAVES"
+ debug "VIRTUAL_IFACES => $LFS_VIRTUAL_IFACES + $RFS_VIRTUAL_IFACES = $ALL_VIRTUAL_IFACES"
+
+ case $FS_FILTER in
+ localfs)
+ PHYSICAL_IFACES="$LFS_PHYSICAL_IFACES"
+ NOT_PHYSICAL_IFACES="$LFS_NOT_PHYSICAL_IFACES"
+ MANDATORY_DEVICES="$LFS_MANDATORY_DEVICES"
+ MANDATORY_SLAVES="$LFS_MANDATORY_SLAVES"
+ VIRTUAL_IFACES="$LFS_VIRTUAL_IFACES"
+ ;;
+ remotefs)
+ PHYSICAL_IFACES="$RFS_PHYSICAL_IFACES"
+ NOT_PHYSICAL_IFACES="$RFS_NOT_PHYSICAL_IFACES"
+ MANDATORY_DEVICES="$RFS_MANDATORY_DEVICES"
+ MANDATORY_SLAVES="$RFS_MANDATORY_SLAVES"
+ VIRTUAL_IFACES="$RFS_VIRTUAL_IFACES"
+ ;;
+ esac
+else
+ resolve_iface_startorder VIRTUAL_IFACES \
+ "$VIRTUAL_IFACES" \
+ "$PHYSICAL_IFACES $MANDATORY_DEVICES $MANDATORY_SLAVES"
+fi
+
+add_to_wordlist AVAILABLE_IFACES $NOT_PHYSICAL_IFACES $PHYSICAL_IFACES
+add_to_wordlist MANDATORY_DEVICES __NSC__ $MANDATORY_SLAVES
-MANDATORY_DEVICES="$MANDATORY_DEVICES __NSC__ $MANDATORY_SLAVES"
# Check for mandatory devices only when booting
test "$MODE" = onboot || MANDATORY_DEVICES=""
@@ -511,11 +645,12 @@
debug "BRIDGE_IFACES = $BRIDGE_IFACES"
debug "SLAVE_IFACES = $SLAVE_IFACES"
debug "MANDATORY_DEVICES = $MANDATORY_DEVICES"
-debug "START_VIFACES = $START_VIFACES"
+debug "VIRTUAL_IFACES = $VIRTUAL_IFACES"
debug "SKIP = $SKIP"
-start_list="$PHYSICAL_IFACES ; $MANDATORY_DEVICES ; $START_VIFACES"
+start_list="$PHYSICAL_IFACES ; $MANDATORY_DEVICES ; $VIRTUAL_IFACES"
debug "start order : ${start_list// / }"
+
status() {
local M IFACE
# declare -i R=0 F=0
@@ -579,7 +714,7 @@
case "$ACTION" in
start)
- echo Setting up network interfaces:
+ echo "Setting up${FS_FILTER:+ (${FS_FILTER})} network interfaces:"
lock_firewall
/sbin/ifstatus $LO &>/dev/null && unset $LO;
for IFACE in ${INTERFACE:- $LO
@@ -618,8 +753,8 @@
rc_reset
done
- # Wait $WAIT_FOR_INTERFACES seconds after interface setup started for
- # hotplug interfaces to become available
+ # Wait $WAIT_FOR_INTERFACES seconds after interface setup
+ # started for hotplug interfaces to become available
NEWLINE=no
while true; do
@@ -707,7 +842,7 @@
if [ -z "$INTERFACE" ] ; then
- for IFACE in $START_VIFACES ; do
+ for IFACE in $VIRTUAL_IFACES ; do
for SI in $SKIP; do
test "$IFACE" = "$SI" && continue 2
done
@@ -761,7 +896,7 @@
stop)
- echo Shutting down network interfaces:
+ echo Shutting down${FS_FILTER:+ (${FS_FILTER})} network interfaces:
if [ -z "$INTERFACE" ] ; then
$FAKE ifdown-route noiface -o rc $MODE
@@ -769,11 +904,12 @@
DONE_IFACES=""
STOP_VIFACES=""
- for IFACE in ${START_VIFACES} ; do
+ for IFACE in ${VIRTUAL_IFACES} ; do
STOP_VIFACES="$IFACE $STOP_VIFACES"
done
- for IFACE in ${INTERFACE:-$STOP_VIFACES $PHYSICAL_IFACES $BONDING_IFACES $AVAILABLE_IFACES} ; do
+ #for IFACE in ${INTERFACE:-$STOP_VIFACES $PHYSICAL_IFACES $BONDING_IFACES $AVAILABLE_IFACES} ; do
+ for IFACE in ${INTERFACE:-$STOP_VIFACES $PHYSICAL_IFACES $AVAILABLE_IFACES} ; do
test -d /sys/class/net/$IFACE || continue
for I in $DONE_IFACES ; do
test "x$I" = "x$IFACE" && continue 2
@@ -859,7 +995,7 @@
done
debug getting MANDATORY_IFACES: FAILED=$FAILED
- for IFACE in $AVAILABLE_IFACES $START_VIFACES ; do
+ for IFACE in $AVAILABLE_IFACES $VIRTUAL_IFACES ; do
for MI in $MANDATORY_IFACES $TOCHECK_IFACES; do
test "$IFACE" = "$MI" && continue 2
done
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/scripts/network-remotefs new/sysconfig-0.71.5/scripts/network-remotefs
--- old/sysconfig-0.71.4/scripts/network-remotefs 1970-01-01 01:00:00.000000000 +0100
+++ new/sysconfig-0.71.5/scripts/network-remotefs 2008-09-23 15:40:06.000000000 +0200
@@ -0,0 +1,87 @@
+#!/bin/bash
+#
+# RemoteFS depending network interface configuration
+#
+# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# Author: Marius Tomaschewski
+#
+# $Id: network-remotefs 1736 2008-09-23 13:40:05Z mt $
+#
+# /etc/init.d/network-remotefs
+#
+### BEGIN INIT INFO
+# Provides: network-remotefs
+# Required-Start: $network $remote_fs haldaemon
+# Should-Start:
+# Required-Stop: $network $remote_fs haldaemon
+# Should-Stop:
+# Default-Start: 2 3 5
+# Default-Stop:
+# Short-Description: Configure the remote-fs depending network interfaces
+# Description: Configure the remote-fs depending network interfaces
+# and set up routing
+### END INIT INFO
+
+. /etc/rc.status
+rc_reset
+
+cd /etc/sysconfig/network
+test -f ./config && . ./config
+if ! . scripts/functions 2>/dev/null; then
+ echo -n "Network: file /etc/sysconfig/network/scripts/functions is missing."
+ rc_failed
+ rc_status -v
+ rc_exit
+fi
+
+test "$DEBUG" = "EXTRA" && . scripts/extradebug
+
+# Only use ifup option 'onboot' if booting or changing runlevel
+# Therefore we check if we were called from init
+MODE=""
+if [ -n "$INIT_VERSION" ] ; then
+ MODE=onboot
+fi
+
+######################################################################
+# Commandline parsing
+#
+SCRIPTNAME=${0##*/}
+debug $*
+declare -a ARGS=()
+while [ $# -gt 0 ]; do
+ : $1
+ case $1 in
+ (-o) shift ; break ;;
+ (*) ARGS=(${ARGS[@]} "$1") ;;
+ esac
+ shift
+done
+declare -a OPTS=(remotefs)
+while [ $# -gt 0 ]; do
+ echo "OPT: '$1'"
+ case $1 in
+ (boot|onboot) MODE=onboot ;;
+ (localfs|remotefs) : ignore ;;
+ (*) OPTS=(${OPTS[@]} "$1") ;;
+ esac
+ shift
+done
+
+exec /etc/init.d/network ${ARGS[@]} -o ${OPTS[@]}
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/sysconfig-0.71.4/VERSION new/sysconfig-0.71.5/VERSION
--- old/sysconfig-0.71.4/VERSION 2008-09-12 09:11:24.000000000 +0200
+++ new/sysconfig-0.71.5/VERSION 2008-09-23 11:49:17.000000000 +0200
@@ -1 +1 @@
-0.71.4
+0.71.5
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org