commit sysconfig for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package sysconfig for openSUSE:Factory checked in at Thu Jan 14 22:31:17 CET 2010. -------- --- sysconfig/sysconfig.changes 2009-12-20 17:17:32.000000000 +0100 +++ sysconfig/sysconfig.changes 2010-01-14 16:04:00.000000000 +0100 @@ -1,0 +2,21 @@ +Thu Jan 14 15:34:52 CET 2010 - mt@suse.de + +- version 0.73.3 +- Fixed netconfig module/action exit code propagation (bnc#568398) +- Applied udevmountd udev rule patch by Ludwig Nussel: don't handle + crypto devices, boot.crypto does that already (bnc#569942) +- Fix to allow ifup $tap when it already exists, e.g. created by + kvm (bnc#557864). +- Synchronized ifup-dhcp and dhcpcd configuration steps to report + status after dhcpcd really finished all its steps (bnc#518219). +- Improved detection if a dhcp client is running, causing ifup-dhcp + and the network script to report false failures, when the client + forks at the moment of the check (bnc#562030 and others). +- Fixed rc option handling in ifup-sysctl, show own name in debug +- Documented the if-up.d/ndp-proxy and its config file in the + ifndp-proxy.5, fixed to follow the sysconfig config file name + conventions (fate#304415). +- Added ifup-sysctl script applying per interface sysctl settings + and documented it in the ifsysctl.5 man page (bnc#494958). + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- sysconfig-0.73.2.tar.bz2 New: ---- sysconfig-0.73.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sysconfig.spec ++++++ --- /var/tmp/diff_new_pack.TuG0I7/_old 2010-01-14 22:30:10.000000000 +0100 +++ /var/tmp/diff_new_pack.TuG0I7/_new 2010-01-14 22:30:10.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package sysconfig (Version 0.73.2) +# spec file for package sysconfig (Version 0.73.3) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,8 +19,8 @@ Name: sysconfig -Version: 0.73.2 -Release: 2 +Version: 0.73.3 +Release: 1 Summary: The sysconfig scheme Group: System/Base License: GPLv2+ @@ -87,7 +87,6 @@ %ghost /etc/sysconfig/network/dhcp %config(noreplace) /etc/sysconfig/network/ifcfg-lo %config(noreplace) /etc/sysconfig/network/ifroute-lo -%config(noreplace) /etc/sysconfig/network/ndp-proxy.conf %config(noreplace) /etc/ppp/ip-up %config(noreplace) /etc/ppp/ip-down %config(noreplace) /etc/ppp/ipv6-up ++++++ sysconfig-0.73.2.tar.bz2 -> sysconfig-0.73.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/ChangeLog new/sysconfig-0.73.3/ChangeLog --- old/sysconfig-0.73.2/ChangeLog 2009-12-04 11:52:39.000000000 +0100 +++ new/sysconfig-0.73.3/ChangeLog 2010-01-14 16:04:41.000000000 +0100 @@ -1,11 +1,127 @@ ------------------------------------------------------------------------ -r2045 | mt | 2009-12-04 11:51:53 +0100 (Fri, 04 Dec 2009) | 2 lines +r2086 | mt | 2010-01-14 16:03:47 +0100 (Thu, 14 Jan 2010) | 2 lines Changed paths: - A /tags/version-0.73.2 (from /trunk:2044) + A /tags/version-0.73.3 (from /trunk:2085) -Tagged version 0.73.2 +Tagged sysconfig version 0.73.3 ------------------------------------------------------------------------ +r2085 | mt | 2010-01-14 16:03:18 +0100 (Thu, 14 Jan 2010) | 2 lines +Changed paths: + M /trunk/package/sysconfig.changes + M /trunk/sysconfig.spec.in + +Merged changes from $OBS/Base:System/sysconfig + +------------------------------------------------------------------------ +r2082 | mt | 2010-01-14 15:41:28 +0100 (Thu, 14 Jan 2010) | 2 lines +Changed paths: + M /trunk/VERSION + M /trunk/package/sysconfig.changes + +- Updated changes file, version 0.73.3 + +------------------------------------------------------------------------ +r2081 | mt | 2010-01-13 17:19:08 +0100 (Wed, 13 Jan 2010) | 1 line +Changed paths: + M /trunk/scripts/netconfig + +Fixed to not to break netconfig -m filter with last exit code fix +------------------------------------------------------------------------ +r2072 | mt | 2010-01-13 14:34:17 +0100 (Wed, 13 Jan 2010) | 3 lines +Changed paths: + M /trunk/config/hardware/81-mount.rules + +udevmountd: don't handle crypto devices, boot.crypto does that already (bnc#569942) + +Signed-off-by: Marius Tomaschewski <mt@suse.de> +------------------------------------------------------------------------ +r2071 | mt | 2010-01-12 09:15:17 +0100 (Tue, 12 Jan 2010) | 1 line +Changed paths: + M /trunk/scripts/netconfig + +Fixed netconfig module/action exit code propagation (bnc#568398) +------------------------------------------------------------------------ +r2067 | mt | 2009-12-14 15:11:04 +0100 (Mon, 14 Dec 2009) | 2 lines +Changed paths: + M /trunk/scripts/ifup-tunnel + +Fix to allow ifup $tap when tap is already created by e.g. kvm +(bnc#557864). +------------------------------------------------------------------------ +r2066 | mt | 2009-12-14 15:10:26 +0100 (Mon, 14 Dec 2009) | 2 lines +Changed paths: + M /trunk/scripts/dhcpcd-hook + M /trunk/scripts/ifup-dhcp + +Synchronized ifup-dhcp and dhcpcd configuration steps to report +status after dhcpcd really finished all its steps (bnc#518219). +------------------------------------------------------------------------ +r2065 | mt | 2009-12-14 15:10:22 +0100 (Mon, 14 Dec 2009) | 3 lines +Changed paths: + M /trunk/scripts/functions + +Improved detection if a dhcp client is running, causing ifup-dhcp and +the network script to report false failures, when the client forks at +the moment of the check (bnc#562030 and others). +------------------------------------------------------------------------ +r2064 | mt | 2009-12-14 15:10:18 +0100 (Mon, 14 Dec 2009) | 1 line +Changed paths: + M /trunk/scripts/ifup-sysctl + +Fixed rc option handling in ifup-sysctl, show ifup-sysctl in debug +------------------------------------------------------------------------ +r2063 | mt | 2009-12-14 15:10:14 +0100 (Mon, 14 Dec 2009) | 1 line +Changed paths: + M /trunk/config/77-network.rules + +Removed a space from ifup-sysctl call in 77-network udev rule +------------------------------------------------------------------------ +r2050 | mt | 2009-12-07 19:34:08 +0100 (Mon, 07 Dec 2009) | 3 lines +Changed paths: + M /trunk/config/Makefile.am + D /trunk/config/ndp-proxy.conf + M /trunk/doc/Makefile.am + A /trunk/doc/ifndp-proxy.5 + M /trunk/scripts/if-up.ndp-proxy + M /trunk/sysconfig.spec.in + +Documented ndp-proxy plugin in the ifndp-proxy.5 manual page, +fixed to use ifndp-proxy config following sysconfig convention +(fate#304415). +------------------------------------------------------------------------ +r2049 | mt | 2009-12-07 19:34:03 +0100 (Mon, 07 Dec 2009) | 1 line +Changed paths: + M /trunk/doc/Makefile.am + M /trunk/scripts/Makefile.am + +- Install ifup-sysctl and ifsysctl.5 in make files (bnc#494958). +------------------------------------------------------------------------ +r2048 | mt | 2009-12-07 19:33:59 +0100 (Mon, 07 Dec 2009) | 4 lines +Changed paths: + M /trunk/config/hardware/50-ipv6.conf + +Added note, that ipv6 is compiled into the kernel and the + net.ipv6.conf.all.disable_ipv6 +sysctl has to be used instead (bnc#558020). Per interface +settings can be set using ifsysctl(5) files (bnc#494958). +------------------------------------------------------------------------ +r2047 | mt | 2009-12-07 19:33:55 +0100 (Mon, 07 Dec 2009) | 3 lines +Changed paths: + M /trunk/config/77-network.rules + +- Added ifup-sysctl call applying per interface sysctl settings + defined in ifsysctl(5) files before the interface is set up + (bnc#494958). +------------------------------------------------------------------------ +r2046 | mt | 2009-12-07 19:33:51 +0100 (Mon, 07 Dec 2009) | 2 lines +Changed paths: + A /trunk/doc/ifsysctl.5 + A /trunk/scripts/ifup-sysctl + +- Implemented ifup-sysctl script allowing to set per interface sysctl + settings (bnc#494958). +------------------------------------------------------------------------ r2044 | mt | 2009-12-04 11:37:28 +0100 (Fri, 04 Dec 2009) | 2 lines Changed paths: M /trunk/VERSION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/VERSION new/sysconfig-0.73.3/VERSION --- old/sysconfig-0.73.2/VERSION 2009-12-04 11:52:07.000000000 +0100 +++ new/sysconfig-0.73.3/VERSION 2010-01-14 16:04:16.000000000 +0100 @@ -1 +1 @@ -0.73.2 +0.73.3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/config/77-network.rules new/sysconfig-0.73.3/config/77-network.rules --- old/sysconfig-0.73.2/config/77-network.rules 2009-12-04 11:52:06.000000000 +0100 +++ new/sysconfig-0.73.3/config/77-network.rules 2010-01-14 16:04:16.000000000 +0100 @@ -3,6 +3,11 @@ SUBSYSTEM=="drivers", ACTION=="add", DEVPATH=="/bus/pci/drivers/ipw3945", RUN+="ipw3945d.sh" # +# Apply per interface sysctl settings before setup (see man 5 ifsysctl): +# +SUBSYSTEM=="net", ACTION=="add", RUN+="/etc/sysconfig/network/scripts/ifup-sysctl $env{INTERFACE} -o hotplug" + +# # The following rules are to: # - mark a (physical) interface as renamed to it's persistent name and # ready to configure by the network service. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/config/Makefile.am new/sysconfig-0.73.3/config/Makefile.am --- old/sysconfig-0.73.2/config/Makefile.am 2009-12-04 11:52:06.000000000 +0100 +++ new/sysconfig-0.73.3/config/Makefile.am 2010-01-14 16:04:16.000000000 +0100 @@ -7,8 +7,7 @@ sysconfig_network_DATA = ifcfg.template \ ifcfg-lo \ - ifroute-lo \ - ndp-proxy.conf + ifroute-lo udevrules_DATA = 77-network.rules diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/config/Makefile.in new/sysconfig-0.73.3/config/Makefile.in --- old/sysconfig-0.73.2/config/Makefile.in 2009-12-04 11:52:21.000000000 +0100 +++ new/sysconfig-0.73.3/config/Makefile.in 2010-01-14 16:04:30.000000000 +0100 @@ -240,8 +240,7 @@ SUBDIRS = hardware sysconfig_network_DATA = ifcfg.template \ ifcfg-lo \ - ifroute-lo \ - ndp-proxy.conf + ifroute-lo udevrules_DATA = 77-network.rules fillup_templates_DATA = sysconfig.dhcp-network \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/config/hardware/50-ipv6.conf new/sysconfig-0.73.3/config/hardware/50-ipv6.conf --- old/sysconfig-0.73.2/config/hardware/50-ipv6.conf 2009-12-04 11:52:06.000000000 +0100 +++ new/sysconfig-0.73.3/config/hardware/50-ipv6.conf 2010-01-14 16:04:16.000000000 +0100 @@ -1,3 +1,11 @@ +# +# Using this file does not work when the module is compiled +# into the kernel (11.2 and above). Instead, please use the +# net.ipv6.conf.all.disable_ipv6 = 1 +# global sysctl setting in /etc/sysctl.conf or also a per +# interface settings in ifsysctl(5) files. +# + # Comment out to disable IPv6: #install ipv6 /bin/true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/config/hardware/81-mount.rules new/sysconfig-0.73.3/config/hardware/81-mount.rules --- old/sysconfig-0.73.2/config/hardware/81-mount.rules 2009-12-04 11:52:06.000000000 +0100 +++ new/sysconfig-0.73.3/config/hardware/81-mount.rules 2010-01-14 16:04:16.000000000 +0100 @@ -3,6 +3,8 @@ # Skip 'add' events for device-mapper ACTION=="add", SUBSYSTEM=="block", KERNEL=="dm-*", GOTO="skip_mount" ACTION=="add", SUBSYSTEM=="block", KERNEL=="md*", GOTO="skip_mount" +# don't handle crypto devices, boot.crypto does that already (bnc#569942) +ACTION=="change", SUBSYSTEM=="block", KERNEL=="dm-*", ENV{DM_TARGET_TYPES}=="crypt", GOTO="skip_mount" ACTION=="add", SUBSYSTEM=="block", ENV{FSTAB_OPTS}=="*nofail*", IMPORT="udevmountd" ACTION=="change", SUBSYSTEM=="block", KERNEL=="dm-*", ENV{FSTAB_OPTS}=="*nofail*", IMPORT="udevmountd" ACTION=="change", SUBSYSTEM=="block", KERNEL=="md*", ENV{FSTAB_OPTS}=="*nofail*", IMPORT="udevmountd" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/config/ndp-proxy.conf new/sysconfig-0.73.3/config/ndp-proxy.conf --- old/sysconfig-0.73.2/config/ndp-proxy.conf 2009-12-04 11:52:06.000000000 +0100 +++ new/sysconfig-0.73.3/config/ndp-proxy.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,29 +0,0 @@ -#-- -# -# Proxy the 'address' of/behind 'address interface' to all -# 'proxy interfaces' using ip neigh command documented in -# the ip(8) manual page. -# -# Don't forget to set net.ipv6.conf.all.proxy_ndp=1, e.g. -# in the /etc/sysctl.conf file. -# -# Format of ndp-proxy.conf is: -# <address> <address interface> <proxy interface list> -# -# Format of ndp-proxy.<address interface>.conf is same to -# the above, but allows also to omit address interface: -# <address> - <proxy interface list> -# -# Example: -# - Description: -# 2001:db8:abba::1/64 -- local eth0 address -# 2001:db8:abba::1001/64 -- address behind tap1 -# 2001:db8:abba::2001/64 -- address behind tap2 -# -# - ndp-proxy.conf configuration: -# 2001:db8:abba::1 eth0 tap1 tap2 -# 2001:db8:abba::1001 tap1 eth0 tap2 -# 2001:db8:abba::2001 tap2 eth0 tap1 -# -#-- - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/configure new/sysconfig-0.73.3/configure --- old/sysconfig-0.73.2/configure 2009-12-04 11:52:20.000000000 +0100 +++ new/sysconfig-0.73.3/configure 2010-01-14 16:04:29.000000000 +0100 @@ -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.63 for sysconfig 0.73.2. +# Generated by GNU Autoconf 2.63 for sysconfig 0.73.3. # # Report bugs to <http://www.suse.de/feedback/>. # @@ -746,8 +746,8 @@ # Identity of this package. PACKAGE_NAME='sysconfig' PACKAGE_TARNAME='sysconfig' -PACKAGE_VERSION='0.73.2' -PACKAGE_STRING='sysconfig 0.73.2' +PACKAGE_VERSION='0.73.3' +PACKAGE_STRING='sysconfig 0.73.3' PACKAGE_BUGREPORT='http://www.suse.de/feedback/' ac_unique_file="scripts/ifup" @@ -1481,7 +1481,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.73.2 to adapt to many kinds of systems. +\`configure' configures sysconfig 0.73.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1551,7 +1551,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sysconfig 0.73.2:";; + short | recursive ) echo "Configuration of sysconfig 0.73.3:";; esac cat <<\_ACEOF @@ -1651,7 +1651,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sysconfig configure 0.73.2 +sysconfig configure 0.73.3 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1665,7 +1665,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.73.2, which was +It was created by sysconfig $as_me 0.73.3, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2518,7 +2518,7 @@ # Define the identity of the package. PACKAGE='sysconfig' - VERSION='0.73.2' + VERSION='0.73.3' cat >>confdefs.h <<_ACEOF @@ -12420,7 +12420,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.73.2, which was +This file was extended by sysconfig $as_me 0.73.3, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12474,7 +12474,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -sysconfig config.status 0.73.2 +sysconfig config.status 0.73.3 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/doc/Makefile.am new/sysconfig-0.73.3/doc/Makefile.am --- old/sysconfig-0.73.2/doc/Makefile.am 2009-12-04 11:52:06.000000000 +0100 +++ new/sysconfig-0.73.3/doc/Makefile.am 2010-01-14 16:04:16.000000000 +0100 @@ -14,6 +14,8 @@ ifcfg-vlan.5 \ ifcfg-wireless.5 \ netconfig.8 \ + ifsysctl.5 \ + ifndp-proxy.5 \ routes.5 doc_DATA = README COPYING Contents Network \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/doc/Makefile.in new/sysconfig-0.73.3/doc/Makefile.in --- old/sysconfig-0.73.2/doc/Makefile.in 2009-12-04 11:52:21.000000000 +0100 +++ new/sysconfig-0.73.3/doc/Makefile.in 2010-01-14 16:04:30.000000000 +0100 @@ -210,6 +210,8 @@ ifcfg-vlan.5 \ ifcfg-wireless.5 \ netconfig.8 \ + ifsysctl.5 \ + ifndp-proxy.5 \ routes.5 doc_DATA = README COPYING Contents Network \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/doc/ifndp-proxy.5 new/sysconfig-0.73.3/doc/ifndp-proxy.5 --- old/sysconfig-0.73.2/doc/ifndp-proxy.5 1970-01-01 01:00:00.000000000 +0100 +++ new/sysconfig-0.73.3/doc/ifndp-proxy.5 2010-01-14 16:04:16.000000000 +0100 @@ -0,0 +1,96 @@ +.\" Process this file with +.\" groff -man -Tascii ifsysctl.5 +.\" +.TH IFNDP-PROXY 5 "December 2009" "sysconfig" "Network configuration" +.SH NAME +ifndp-proxy[-<interface name>] \- IPv6 \fBNDP\fR and IPv4 \fBARP\fR proxy entries +.SH SYNOPSIS +\fB/etc/sysconfig/network/ifndp-proxy\fR +.br +\fB/etc/sysconfig/network/ifndp-proxy-\fR<\fIinterface\ name\fR> +.SH DESCRIPTION +These files contain IPv6 \fBNDP\fR and IPv4 \fBARP\fR proxy settings, +that should be applied using the \fBip neigh add proxy\fR command +documented in the ip(8) manual page that provides a common interface +for IPv4 and IPv6. + +The \fBNDP\fR/\fBARP\fR proxy is required, e.g. when IP addresses +from the same subnet have to be used on the interface of the host +as well as on interfaces behind a (tunnel) interface and using a +bridge is not an option. + +Don't forget to enable forwarding and the \fBNDP\fR/\fBARP\fR proxy +by setting +.nf + \fBnet.ipv6.conf.\fR<\fIall|default|interface name\fR>\fB.proxy_ndp = 1\fR + \fBnet.ipv6.conf.\fR<\fIall|default|interface name\fR>\fB.forwarding = 1\fR +and/or + \fBnet.ipv4.conf.\fR<\fIall|default|interface name\fR>\fB.proxy_arp = 1\fR + \fBnet.ipv4.conf.\fR<\fIall|default|interface name\fR>\fB.forwarding = 1\fR +or + \fBnet.ipv4.ip_forward = 1\fR +.fi +either as global \fIall\fR setting in the /etc/sysctl.conf file or +using the \fBifsysctl(5)\fR files, that allow per-interface setup. +.br +Forwarding can be also enabled in the \fB/etc/sysconfig/sysctl\fR +file using the \fBIP_FORWARD\fR and \fBIPV6_FORWARD\fR variables. + +The proxy entries are added and deleted using the + \fBif-\fR{\fBup\fR|\fBdown\fR}\fB.d/ndp-proxy\fR +script, every time after an involved interface has been set up or +down. + +.SH SYNTAX +The format of the \fBifndp-proxy\fR file is: +.nf +<address> <address interface> <proxy interface list> +.fi + +The format of the \fBifndp-proxy-\fR<\fIaddress interface\fR> file +is same to above, but allows also to omit the address interface +by using a "-" as placeholder inside of the file, because it is +already available in the file name: +.nf +<address> <address interface | -> <proxy interface list> +.fi + +Lines beginning with # and blank lines are ignored. + +Each line defines to add a proxy \fBNDP\fR/\fBARP\fR entry with the +\fIaddress\fR of or behind \fIaddress interface\fR to all interfaces +in the \fIproxy interface list\fR. + +.SH EXAMPLES +Let's assume, your machine is connected via eth0 to a switch with the +networks 2001:db8:abba::/64 and 192.168.100.1/24 and is using the IP +address 1 itself. You'd like to use the addresses 11 and 12 e.g. for +virtual machines behind the tap1 and tap2 interface, that is: +.nf + 2001:db8:abba::1/64 -- local eth0 address + 2001:db8:abba::11/64 -- address behind tap1 + 2001:db8:abba::12/64 -- address behind tap2 + 192.168.100.1/24 -- local eth0 address + 192.168.100.11/24 -- address behind tap1 + 192.168.100.12/24 -- address behind tap2 +.fi +then set up the following entries in the ifndp-proxy file: +.nf + 2001:db8:abba::1 eth0 tap1 tap2 + 2001:db8:abba::11 tap1 eth0 tap2 + 2001:db8:abba::12 tap2 eth0 tap1 + 192.168.100.1 eth0 tap1 tap2 + 192.168.100.11 tap1 eth0 tap2 + 192.168.100.12 tap2 eth0 tap1 +.fi +additionally to the routing entries in the \fBroutes\fR or +\fBifroute\fR-<\fIinterface name>\fR files. +.SH BUGS +Please report bugs at <https://bugzilla.novell.com/> +.SH AUTHOR +.nf +Marius Tomaschewski <mt@suse.de> +.SH "SEE ALSO" +.BR ifup (8) +.BR ifcfg (5) +.BR ifsysctl(8) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/doc/ifsysctl.5 new/sysconfig-0.73.3/doc/ifsysctl.5 --- old/sysconfig-0.73.2/doc/ifsysctl.5 1970-01-01 01:00:00.000000000 +0100 +++ new/sysconfig-0.73.3/doc/ifsysctl.5 2010-01-14 16:04:16.000000000 +0100 @@ -0,0 +1,96 @@ +.\" Process this file with +.\" groff -man -Tascii ifsysctl.5 +.\" +.TH IFSYSCTL 5 "December 2009" "sysconfig" "Network configuration" +.SH NAME +ifsysctl[-<interface name>] \- per network interface sysctl settings +.SH SYNOPSIS +\fB/etc/sysconfig/network/ifsysctl\fR +.br +\fB/etc/sysconfig/network/ifsysctl-\fR<\fIinterface\ name\fR> +.SH DESCRIPTION +These files are intended to contain \fBsysctl\fR settings, that +should be applied when a network interface is created. This are +usually interface specific settings, like: + +.nf + net.ipv6.conf.eth0.use_tempaddr = 1 +or + net.ipv4.conf.eth0.rp_filter = 0 +.fi + +The settings are applied by the +.B /etc/sysconfig/network/scripts/ifup-sysctl +script executed via +.B /etc/udev/rules.d/77-network.rules +rule (see \fBudev(7)\fR), after the creation and after the rename of the +interface name to its persistent name (when applicable), but before the +\fBifup <interface name> -o hotplug\fR may be executed to configure the interface. + +The settings are not applied by default when the \fINetworkManager\fR is active +(NETWORKMANAGER=yes), except when the \fBIFSYSCTL_NETWORKMANAGER\fR=\fIyes\fR +variable is set in the \fB/etc/sysconfig/network/config\fR file. + +Settings from the \fBifsysctl-\fR file are applied every time an interface has +been created. + +Settings from the \fBifsysctl-\fIinterface\ name\fR file are applied when the +interface with the corresponding interface name has been created. + +.SH SYNTAX +The \fBsysctl(8)\fR utility is required to apply the settings. It supports two +separator characters for sysctl keywords: a "\fB.\fR" in \fIdefault format\fR +and a "\fB/\fR" in the \fIalternate format\fR. +Therefore the syntax is basically same to the /etc/sysctl.conf file. + +Interface names may contain a "\fB.\fR". In the default sysctl format using +a "\fB.\fR" as separator, that is any "\fB.\fR" in the interface name of the +keyword, has to be replaced with a "\fB/\fR". In the alternate sysctl format +with "\fB/\fR" as separator, normal interface names can be used. + +.PP +\fIOptionally\fR, the ifsysctl files may contain also the \fB$INTERFACE\fR +and the \fB$SYSCTL_IF\fR variables, that are automatically replaced with the +current interface name usable in the alternate format and with the sysctl-quoted +interface name for the default format, before the settings are passed to the +sysctl utility. + +\fINote also\fR, that settings with variables in the \fBifsysctl\fR (without +the -<interface name> suffix), will be applied for every interface! +.br +Further, files with variables are not compatible to the /etc/sysctl.conf file. + +.SH EXAMPLES +Settings for "eth0" and "eth0.1" interfaces +.nf + # using "." as separator: + net.ipv6.conf.eth0.use_tempaddr = 1 + net.ipv6.conf.eth0/1.use_tempaddr = 1 + + # using "/" as separator: + net/ipv6/conf/eth0/use_tempaddr = 1 + net/ipv6/conf/eth0.0/use_tempaddr = 1 +.fi + +Settings with variables: +.nf + # using "." as separator: + net.ipv6.conf.$SYSCTL_IF.use_tempaddr = 1 + + # using "/" as separator: + net/ipv6/conf/$INTERFACE/use_tempaddr = 1 +.fi + +To test your ifsysctl-eth0 or ifsysctl file, use: +.nf + /etc/sysconfig/network/scripts/ifup-sysctl eth0 -o debug +.fi +.SH BUGS +Please report bugs at <https://bugzilla.novell.com/> +.SH AUTHOR +.nf +Marius Tomaschewski <mt@suse.de> +.SH "SEE ALSO" +.BR ifup (8) +.BR ifcfg (5) +.BR sysctl(8) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/scripts/Makefile.am new/sysconfig-0.73.3/scripts/Makefile.am --- old/sysconfig-0.73.2/scripts/Makefile.am 2009-12-04 11:52:06.000000000 +0100 +++ new/sysconfig-0.73.3/scripts/Makefile.am 2010-01-14 16:04:16.000000000 +0100 @@ -22,6 +22,7 @@ ifup-route \ ifup-services \ ifup-skel \ + ifup-sysctl \ ifup-wireless \ ifup-tunnel \ ifplugd-selectif \ @@ -61,6 +62,8 @@ 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 ifup-sysctl $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifdown-sysctl + ln -sf ifup-sysctl $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifstatus-sysctl ln -sf ifdown-connection $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifstatus-connection ln -sf ifup-wireless $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifstatus-wireless ln -sf ifup-wireless $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifdown-wireless diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/scripts/Makefile.in new/sysconfig-0.73.3/scripts/Makefile.in --- old/sysconfig-0.73.2/scripts/Makefile.in 2009-12-04 11:52:21.000000000 +0100 +++ new/sysconfig-0.73.3/scripts/Makefile.in 2010-01-14 16:04:30.000000000 +0100 @@ -255,6 +255,7 @@ ifup-route \ ifup-services \ ifup-skel \ + ifup-sysctl \ ifup-wireless \ ifup-tunnel \ ifplugd-selectif \ @@ -825,6 +826,8 @@ 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 ifup-sysctl $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifdown-sysctl + ln -sf ifup-sysctl $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifstatus-sysctl ln -sf ifdown-connection $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifstatus-connection ln -sf ifup-wireless $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifstatus-wireless ln -sf ifup-wireless $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifdown-wireless diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/scripts/dhcpcd-hook new/sysconfig-0.73.3/scripts/dhcpcd-hook --- old/sysconfig-0.73.2/scripts/dhcpcd-hook 2009-12-04 11:52:06.000000000 +0100 +++ new/sysconfig-0.73.3/scripts/dhcpcd-hook 2010-01-14 16:04:16.000000000 +0100 @@ -19,7 +19,7 @@ # # Author: Peter Poeml <poeml@suse.de> # -# $Id: dhcpcd-hook 1884 2009-09-15 06:41:56Z mt $ +# $Id: dhcpcd-hook 2066 2009-12-14 14:10:26Z mt $ # @@ -133,6 +133,9 @@ case $state in up) + write_cached_config_data dhcp4_state up $INTERFACE + commit_cached_config_data $INTERFACE + $debug && $log_dbg "Running ifup $INTERFACE -o dhcp" ifup $INTERFACE -o dhcp @@ -141,12 +144,11 @@ -i $INTERFACE $NC_OPTIONS \ -l $leaseinfo 2>&1 | $log_dbg - if hostname_changed ; then - # reload syslog so it knows the new hostname - /etc/init.d/syslog reload - fi ;; down) + write_cached_config_data dhcp4_state down $INTERFACE + commit_cached_config_data $INTERFACE + # We now call PRE_DOWN_SCRIPT directly from ifdown, because it was called # POST from here (after IP address was removed). Thus we don't need this # $debug && $log_dbg "Running ifdown $INTERFACE -o dhcp" @@ -158,6 +160,9 @@ 2>&1 | $log_dbg ;; new) + write_cached_config_data dhcp4_state new $INTERFACE + commit_cached_config_data $INTERFACE + $debug && $log_dbg "new IP address: $IPADDR" $debug && NC_OPTIONS="-v" @@ -165,15 +170,23 @@ -i $INTERFACE $NC_OPTIONS \ < $leaseinfo 2>&1 | $log_dbg + $debug && $log_dbg "Running ifdown $INTERFACE -o dhcp" + ifdown $INTERFACE -o dhcp + $debug && $log_dbg "Running ifup $INTERFACE -o dhcp" + ifup $INTERFACE -o dhcp + ;; +complete) + # dhcpcd finished all requested configuration steps ... + # check if hostname changed and reload syslog when needed if hostname_changed ; then # reload syslog so it knows the new hostname /etc/init.d/syslog reload fi - $debug && $log_dbg "Running ifdown $INTERFACE -o dhcp" - ifdown $INTERFACE -o dhcp - $debug && $log_dbg "Running ifup $INTERFACE -o dhcp" - ifup $INTERFACE -o dhcp + $debug && $log_dbg "DHCP4 configuration of $INTERFACE is complete" + + write_cached_config_data dhcp4_state complete $INTERFACE + commit_cached_config_data $INTERFACE ;; esac diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/scripts/functions new/sysconfig-0.73.3/scripts/functions --- old/sysconfig-0.73.2/scripts/functions 2009-12-04 11:52:06.000000000 +0100 +++ new/sysconfig-0.73.3/scripts/functions 2010-01-14 16:04:16.000000000 +0100 @@ -23,7 +23,7 @@ # Mads Martin Joergensen <mmj@suse.de> # Marius Tomaschewski <mt@suse.de> # -# $Id: functions 2026 2009-12-03 17:02:52Z mt $ +# $Id: functions 2065 2009-12-14 14:10:22Z mt $ # . /etc/sysconfig/network/scripts/functions.common @@ -721,20 +721,32 @@ dhcpc4_on_iface() { local pid retval=1 [ "x$DHCLIENT" != x -a "x$INTERFACE" != x ] || return $retval - for pid in `pgrep -f "^(/.*/)?$DHCLIENT\>.*\<$INTERFACE\>$" 2>/dev/null` ; do + # when the dhcp client forks, it may be not visible + # in the process list for a short (usleep) while... + typeset -i retries=3 + for ((; retries > 0; retries--)) ; do + for pid in `pgrep -f "^(/.*/)?$DHCLIENT\>.*\<$INTERFACE\>$" 2>/dev/null` ; do retval=0 test "x$1" == "x-q" && break echo $pid + done + (( retval == 0 )) && break || usleep 100000 done return $retval } dhcpc6_on_iface() { local pid retval=1 [ "x$DHCLIENT6" != x -a "x$INTERFACE" != x ] || return $retval - for pid in `pgrep -f "^(/.*/)?$DHCLIENT6\>.*\<$INTERFACE\>$" 2>/dev/null` ; do + # when the dhcp client forks, it may be not visible + # in the process list for a short (usleep) while... + typeset -i retries=3 + for ((; retries > 0; retries--)) ; do + for pid in `pgrep -f "^(/.*/)?$DHCLIENT6\>.*\<$INTERFACE\>$" 2>/dev/null` ; do retval=0 test "x$1" == "x-q" && break echo $pid + done + (( retval == 0 )) && break || usleep 100000 done return $retval } @@ -743,10 +755,16 @@ [ "x$DHCLIENT" != x ] && pattern=$DHCLIENT || pattern="" [ "x$DHCLIENT6" != x ] && pattern="${pattern:+$pattern|}$DHCLIENT6" [ "x$pattern" != x -a "x$INTERFACE" != x ] || return $retval - for pid in `pgrep -f "^(/.*/)?($pattern)\>.*\<$INTERFACE\>$" 2>/dev/null` ; do + # when the dhcp client forks, it may be not visible + # in the process list for a short (usleep) while... + typeset -i retries=3 + for ((; retries > 0; retries--)) ; do + for pid in `pgrep -f "^(/.*/)?($pattern)\>.*\<$INTERFACE\>$" 2>/dev/null` ; do retval=0 test "$1" == "-q" && break echo $pid + done + (( retval == 0 )) && break || usleep 100000 done return $retval } @@ -756,10 +774,16 @@ [ "x$INTERFACE" != x ] || return $retval # just search for all known dhcp clients pattern="dhcpcd|dhclient|dhcp6c|dhclient6" - for pid in `pgrep -f "^(/.*/)?($pattern)\>.*\<$INTERFACE\>$" 2>/dev/null` ; do + # when the dhcp client forks, it may be not visible + # in the process list for a short (usleep) while... + typeset -i retries=3 + for ((; retries > 0; retries--)) ; do + for pid in `pgrep -f "^(/.*/)?($pattern)\>.*\<$INTERFACE\>$" 2>/dev/null` ; do retval=0 test "$1" == "-q" && break echo $pid + done + (( retval == 0 )) && break || usleep 100000 done return $retval } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/scripts/if-up.ndp-proxy new/sysconfig-0.73.3/scripts/if-up.ndp-proxy --- old/sysconfig-0.73.2/scripts/if-up.ndp-proxy 2009-12-04 11:52:06.000000000 +0100 +++ new/sysconfig-0.73.3/scripts/if-up.ndp-proxy 2010-01-14 16:04:16.000000000 +0100 @@ -25,27 +25,34 @@ # 'proxy interfaces' using ip neigh command documented in # the ip(8) manual page. # -# Don't forget to set net.ipv6.conf.all.proxy_ndp=1, e.g. -# in the /etc/sysctl.conf file. +# Don't forget to enable net.ipv6.conf.all.proxy_ndp=1 or +# net.ipv4.conf.all.proxy_arp, e.g. in /etc/sysctl.conf or +# /etc/sysconfig/network/ifsysctl[-<interface>] files, that +# support also interface specific sysctl settings. # -# Format of ndp-proxy.conf is: +# Format of ifndp-proxy is: # <address> <address interface> <proxy interface list> # -# Format of ndp-proxy.<address interface>.conf is same to +# Format of ifndp-proxy-<address interface> is same to # the above, but allows also to omit address interface: # <address> - <proxy interface list> # # Example: # - Description: -# 2001:db8:abba::1/64 -- local eth0 address -# 2001:db8:abba::1001/64 -- address behind tap1 -# 2001:db8:abba::2001/64 -- address behind tap2 -# -# - ndp-proxy.conf configuration: -# 2001:db8:abba::1 eth0 tap1 tap2 -# 2001:db8:abba::1001 tap1 eth0 tap2 -# 2001:db8:abba::2001 tap2 eth0 tap1 -# +# 2001:db8:abba::1/64 -- local eth0 address +# 2001:db8:abba::11/64 -- address behind tap1 +# 2001:db8:abba::12/64 -- address behind tap2 +# 192.168.100.1/24 -- local eth0 address +# 192.168.100.11/24 -- address behind tap1 +# 192.168.100.12/24 -- address behind tap2 +# +# - ifndp-proxy configuration: +# 2001:db8:abba::1 eth0 tap1 tap2 +# 2001:db8:abba::11 tap1 eth0 tap2 +# 2001:db8:abba::12 tap2 eth0 tap1 +# 192.168.100.1 eth0 tap1 tap2 +# 192.168.100.11 tap1 eth0 tap2 +# 192.168.100.12 tap2 eth0 tap1 #-- usage () { @@ -97,19 +104,18 @@ ###################################################################### # configuration files relative to /etc/sysconfig/network -ndp_proxy_conf='ndp-proxy.conf' -ndp_proxy_glob='ndp-proxy.*.conf' +ndp_proxy_conf='ifndp-proxy' +ndp_proxy_glob='ifndp-proxy-*' ###################################################################### -# apply interface from file name when missed in ndp-proxy.$IF.conf +# apply interface from file name when missed in ifndp-proxy-$IF read_ifname_conf() { local iface fname=$1 test -s "$fname" || return 1 - iface=${fname%.conf} - iface=${iface##*ndp-proxy.} + iface=${fname##*ifndp-proxy-} case $iface in ""|"-") return 1 ;; esac diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/scripts/ifup-dhcp new/sysconfig-0.73.3/scripts/ifup-dhcp --- old/sysconfig-0.73.2/scripts/ifup-dhcp 2009-12-04 11:52:06.000000000 +0100 +++ new/sysconfig-0.73.3/scripts/ifup-dhcp 2010-01-14 16:04:16.000000000 +0100 @@ -18,7 +18,7 @@ # Author: Christian Zoz <zoz@suse.de>, 2002-2006 # Peter Poeml <poeml@suse.de>, 2002-2006 # -# $Id: ifup-dhcp 2026 2009-12-03 17:02:52Z mt $ +# $Id: ifup-dhcp 2066 2009-12-14 14:10:26Z mt $ # usage () { @@ -47,7 +47,7 @@ # check arguments and how we are called (in case of links) # SCRIPTNAME=${0##*/} -debug $* +debug "$SCRIPTNAME $*" case "${SCRIPTNAME}" in ifup-*) ACTION=start ;; @@ -560,7 +560,7 @@ # remember the hostname to handle a change later write_cached_config_data hostname "`hostname 2>/dev/null`" $INTERFACE - commit_cached_config_data $INTERFACE + commit_cached_config_data $INTERFACE debug "Activating interface $INTERFACE" if ! is_iface_up $INTERFACE ; then @@ -595,14 +595,19 @@ case "$DHCLIENT" in (dhcpcd) test -n "$DHCP4_STATUS" || { - start_dhcp4_dhcpcd - DHCP4_STARTED="yes" + start_dhcp4_dhcpcd && { + DHCP4_STARTED="yes" + write_cached_config_data dhcp4_client $DHCLIENT $INTERFACE + write_cached_config_data dhcp4_state started $INTERFACE + commit_cached_config_data $INTERFACE + } || DHCP4_STATUS=$? } ;; (dhclient) test -n "$DHCP4_STATUS" || { - start_dhcp4_dhclient - DHCP4_STARTED="yes" + start_dhcp4_dhclient && { + DHCP4_STARTED="yes" + } || DHCP4_STATUS=$? } ;; esac @@ -611,8 +616,9 @@ case "$DHCLIENT6" in (dhcp6c) test -n "$DHCP6_STATUS" || { - start_dhcp6_dhcp6c - DHCP6_STARTED="yes" + start_dhcp6_dhcp6c && { + DHCP6_STARTED="yes" + } || DHCP6_STATUS=$? } ;; #(dhclient) @@ -625,8 +631,9 @@ ;; esac done + ### FIXME # don't hurry too much... - [ "x$DHCP6_STARTED" = xyes -o "x$DHCP4_STARTED" = xyes ] && sleep 1 + ###[ "x$DHCP6_STARTED" = xyes -o "x$DHCP4_STARTED" = xyes ] && sleep 1 # # in case we've started at least one client, wait the specified @@ -635,9 +642,7 @@ DHCP4_MESSAGE='' DHCP6_MESSAGE='' - # - # TODO: does one the actual clients still exit on infinite lease?? - # (dhcpcd does not do this any more) + typeset -i wusleep=100000 typeset -i wab_max=${DHCLIENT_WAIT_AT_BOOT:-15}; let wab_max\*=10 for ((wab_cnt=0; wab_cnt<=wab_max; wab_cnt++)); do @@ -657,7 +662,8 @@ fi [ -n "$DHCP4_STATUS" ] && continue - if [ -e $info -a ! $info -ot $stamp ]; then + state=`read_cached_config_data dhcp4_state $INTERFACE` + if [ "x$state" = "xcomplete" -a -e $info -a ! $info -ot $stamp ]; then IP='' ; NM='' ; HN='' while read line ; do case "$line" in @@ -735,7 +741,10 @@ done if [ -z "$DHCP4_STATUS" -o -z "$DHCP6_STATUS" ] ; then ((wab_cnt % 20 == 1)) && message_n .\ - usleep 100000 + usleep $wusleep + else + # ok, we have status from both clients now => done + break fi done message " " @@ -967,8 +976,10 @@ #if [ $STATUS -eq $R_SUCCESS ] ; then # delete primary flag from cache file if needed - delete_from_cached_config_data primary yes $INTERFACE - commit_cached_config_data $INTERFACE + delete_from_cached_config_data primary yes $INTERFACE + delete_from_cached_config_data 'dhcp4_*' '' $INTERFACE + delete_from_cached_config_data 'dhcp6_*' '' $INTERFACE + commit_cached_config_data $INTERFACE # This is useful for pcmcia interfaces... before the modules can be # unloaded, the device must be unused. @@ -1001,7 +1012,9 @@ stamp=/var/lib/dhcpcd/dhcpcd-$INTERFACE.timestamp info=/var/lib/dhcpcd/dhcpcd-$INTERFACE.info - if [ \( -e $info -a ! $info -ot $stamp \) -a -n \ + state=`read_cached_config_data dhcp4_state $INTERFACE` + if [ "x$state" = "xcomplete" -a \ + \( -e $info -a ! $info -ot $stamp \) -a -n \ "`ip -o -f inet addr show $INTERFACE`" ]; then while read line ; do case "$line" in diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/scripts/ifup-sysctl new/sysconfig-0.73.3/scripts/ifup-sysctl --- old/sysconfig-0.73.2/scripts/ifup-sysctl 1970-01-01 01:00:00.000000000 +0100 +++ new/sysconfig-0.73.3/scripts/ifup-sysctl 2010-01-14 16:04:16.000000000 +0100 @@ -0,0 +1,133 @@ +#!/bin/bash +# +# Copyright (c) 2009 SUSE LINUX Products GmbH Nuernberg, Germany. +# All rights reserved. +# +# 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 <mt@suse.de> +# +usage () { + echo $@ + echo "usage: if{up,down,status}-sysctl [<config>] <interface> [-o <options>]" + echo "" + echo "Options are:" + echo " [on]boot : we are currently booting (or shutting down)" + echo " auto : alias for boot" + echo " hotplug : we are handling a hotplug event" + echo " debug : be verbose" + exit $R_USAGE +} + +###################################################################### +# change the working direcory and source some common files +# +R_INTERNAL=1 # internal error, e.g. no config or missing scripts +cd /etc/sysconfig/network || exit $R_INTERNAL +test -f ./config && . ./config + +# we source common constants and log functions only here +test -f scripts/functions.common && \ + . scripts/functions.common || exit $R_INTERNAL + +###################################################################### +# check arguments and how we are called (in case of links) +# +SCRIPTNAME=${0##*/} +debug "$SCRIPTNAME $*" +ACTION=${SCRIPTNAME#if} +ACTION=${ACTION%%-*} +case "${ACTION}" in + up|status|down) ;; + *) usage +esac +case "$1" in ""|-h|*help*) usage; esac +CONFIG=$1 +shift +if [ -n "$1" -a "$1" != "-o" ] ; then + INTERFACE=$1 +else + INTERFACE=$CONFIG +fi +shift +test "$1" = "-o" && shift +OPTIONS="$@" +MODE=manual +while [ $# -gt 0 ]; do + case $1 in + boot|onboot) MODE=auto ;; + hotplug) MODE=auto ;; + auto) MODE=auto ;; + quiet) be_quiet_has_gone ;; + debug) DEBUG=yes ;; + rc) RUN_FROM_RC=yes ;; + *) debug unknown option $1 ;; + esac + shift +done + + +###################################################################### +if test "$NETWORKMANAGER" = yes ; then + # do we have to apply in NetworkManager mode? + test "${IFSYSCTL_NETWORKMANAGER:-no}" = yes || exit 0 +fi + +###################################################################### +# Check needed tools +# +if ! [ -x /sbin/sysctl ]; then + err_mesg "sysctl utility missed, install procps" + exit $R_INTERNAL +fi + +ifsysctl_files() +{ + local restore_noglob=`shopt -o -p noglob` + shopt -o -s noglob + local CF=$1 + for cf in ./ifsysctl ${CF:+"./ifsysctl-${CF}"} ; do + test -r "$cf" && echo "$cf" + done + eval $restore_noglob +} + +get_interface_sysctls() +{ + local IF="$1" CF="$2" + test -n "$IF" -a -n "$CF" || return 1 + + LANG=C LC_ALL=C \ + awk -vI="$IF" -- 'BEGIN{S=I; gsub("\\.", "/", S);} + { gsub("\\$INTERFACE", I); gsub("\\$SYSCTL_IF", S); print $0; } + ' `ifsysctl_files "$CF"` </dev/null +} + +###################################################################### +case $ACTION in +up) + test "$DEBUG" = yes && quiet='' || quiet='-q' + debug "Applying $INTERFACE ifsysctl settings" + out=`get_interface_sysctls "$INTERFACE" "$CONFIG" | \ + /sbin/sysctl -e $quiet -p - 2>&1` + test "x$out" = x || message_if_not_run_from_rc "$out" +;; +down) +;; +status) +;; +esac + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/scripts/ifup-tunnel new/sysconfig-0.73.3/scripts/ifup-tunnel --- old/sysconfig-0.73.2/scripts/ifup-tunnel 2009-12-04 11:52:06.000000000 +0100 +++ new/sysconfig-0.73.3/scripts/ifup-tunnel 2010-01-14 16:04:16.000000000 +0100 @@ -22,7 +22,7 @@ # # The static ipip,gre,sit tunnel code extracted from main ifup script. # -# $Id: ifup-tunnel 1827 2009-01-23 14:46:11Z mt $ +# $Id: ifup-tunnel 2067 2009-12-14 14:11:04Z mt $ # usage () { @@ -252,8 +252,20 @@ esac ;; tun|tap) - # we use a persistent tunnel by default - if [ "$TUNNEL_SET_PERSISTENT" != no ] ; then + if [ -d "/sys/class/net/$INTERFACE" ] ; then + owner=`cat /sys/class/net/$INTERFACE/owner 2>/dev/null` + group=`cat /sys/class/net/$INTERFACE/group 2>/dev/null` + debug "Tunnel interface $INTERFACE exists ($owner:$group)" + info="Already exists" + if [ -n "$owner" ] ; then + info="$info, owned by uid $owner" + fi + if [ "x$group" != "x-1" ] ; then + info="$info, gid $group" + fi + printf " %-9s %s\n" "$INTERFACE" "$info" + elif [ "$TUNNEL_SET_PERSISTENT" != no ] ; then + # we use a persistent tunnel by default case "$INTERFACETYPE" in tap) TUNCTL_TYPE_ARG="-p" ;; tun) TUNCTL_TYPE_ARG="-n" ;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/scripts/netconfig new/sysconfig-0.73.3/scripts/netconfig --- old/sysconfig-0.73.2/scripts/netconfig 2009-12-04 11:52:06.000000000 +0100 +++ new/sysconfig-0.73.3/scripts/netconfig 2010-01-14 16:04:16.000000000 +0100 @@ -233,7 +233,7 @@ local mfilter="$1" local errors=() local msg="" - local ret=0 + local ret=0 err=0 if [ -n "$FORCE_REPLACE" ]; then export FORCE_REPLACE=$FORCE_REPLACE @@ -260,13 +260,13 @@ continue ;; esac - msg=`"$MODULEDIR/$plg" 2>&1` + msg=`"$MODULEDIR/$plg" 2>&1` ; ret=$? + if [ "$ret" != "0" -a "$err" = "0" ]; then + err=$ret + fi if [ "x$msg" != x ]; then errors[${#errors[@]}]="$msg" fi - if [ "$?" != "0" ]; then - ret=$? - fi done if [ ${#errors[@]} -gt 0 ]; then @@ -274,7 +274,7 @@ echo "$msg" done fi - return $ret + return $err } @@ -439,32 +439,33 @@ exit 1; fi -EXITVAL=0 +RET=0 +ERR=0 case "$ACTION" in modify) - modify - if [ "$?" != "0" ]; then EXITVAL=$?; fi - run_modules "$MODFILTER" - if [ "$?" != "0" ]; then EXITVAL=$?; fi - ;; - remove) - remove - if [ "$?" != "0" ]; then EXITVAL=$?; fi - run_modules "$MODFILTER" - if [ "$?" != "0" ]; then EXITVAL=$?; fi + modify ; RET=$? + if [ "$RET" != "0" -a "$ERR" = "0" ]; then ERR=$RET; fi + run_modules "$MODFILTER" ; RET=$? + if [ "$RET" != "0" -a "$ERR" = "0" ]; then ERR=$RET; fi ;; update) - run_modules "$MODFILTER" - if [ "$?" != "0" ]; then EXITVAL=$?; fi + run_modules "$MODFILTER" ; RET=$? + if [ "$RET" != "0" -a "$ERR" = "0" ]; then ERR=$RET; fi + ;; + remove) + remove ; RET=$? + if [ "$RET" != "0" -a "$ERR" = "0" ]; then ERR=$RET; fi + run_modules "$MODFILTER" ; RET=$? + if [ "$RET" != "0" -a "$ERR" = "0" ]; then ERR=$RET; fi ;; *) usage "Invalid action given.\n" ;; esac - + unLock "$PROGNAME" -exit $EXITVAL +exit $ERR # vim: set ts=8 sts=4 sw=4 ai et: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/sysconfig.spec new/sysconfig-0.73.3/sysconfig.spec --- old/sysconfig-0.73.2/sysconfig.spec 2009-12-04 11:52:28.000000000 +0100 +++ new/sysconfig-0.73.3/sysconfig.spec 2010-01-14 16:04:37.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package sysconfig (Version 0.73.2) +# spec file for package sysconfig (Version 0.73.3) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,11 +19,11 @@ Name: sysconfig -Version: 0.73.2 +Version: 0.73.3 Release: 0 Summary: The sysconfig scheme Group: System/Base -License: GPL v2 or later +License: GPLv2+ AutoReqProv: on PreReq: %fillup_prereq %insserv_prereq textutils fileutils gawk sed grep Requires: iproute2 dbus-1 hal procps @@ -60,7 +60,7 @@ --sysconfdir=%_sysconfdir \ --mandir=%_mandir \ --with-fillup-templatesdir=/var/adm/fillup-templates -%{__make} +%{__make} %{?_smp_mflags} %check make check @@ -87,7 +87,6 @@ %ghost /etc/sysconfig/network/dhcp %config(noreplace) /etc/sysconfig/network/ifcfg-lo %config(noreplace) /etc/sysconfig/network/ifroute-lo -%config(noreplace) /etc/sysconfig/network/ndp-proxy.conf %config(noreplace) /etc/ppp/ip-up %config(noreplace) /etc/ppp/ip-down %config(noreplace) /etc/ppp/ipv6-up diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysconfig-0.73.2/sysconfig.spec.in new/sysconfig-0.73.3/sysconfig.spec.in --- old/sysconfig-0.73.2/sysconfig.spec.in 2009-12-04 11:52:07.000000000 +0100 +++ new/sysconfig-0.73.3/sysconfig.spec.in 2010-01-14 16:04:16.000000000 +0100 @@ -23,7 +23,7 @@ Release: 0 Summary: The sysconfig scheme Group: System/Base -License: GPL v2 or later +License: GPLv2+ AutoReqProv: on PreReq: %fillup_prereq %insserv_prereq textutils fileutils gawk sed grep Requires: iproute2 dbus-1 hal procps @@ -60,7 +60,7 @@ --sysconfdir=%_sysconfdir \ --mandir=%_mandir \ --with-fillup-templatesdir=/var/adm/fillup-templates -%{__make} +%{__make} %{?_smp_mflags} %check make check @@ -87,7 +87,6 @@ %ghost /etc/sysconfig/network/dhcp %config(noreplace) /etc/sysconfig/network/ifcfg-lo %config(noreplace) /etc/sysconfig/network/ifroute-lo -%config(noreplace) /etc/sysconfig/network/ndp-proxy.conf %config(noreplace) /etc/ppp/ip-up %config(noreplace) /etc/ppp/ip-down %config(noreplace) /etc/ppp/ipv6-up ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de