Hello community, here is the log from the commit of package sysconfig checked in at Fri Jul 25 17:05:18 CEST 2008. -------- --- sysconfig/sysconfig.changes 2008-05-23 12:02:20.000000000 +0200 +++ /mounts/work_src_done/STABLE/sysconfig/sysconfig.changes 2008-07-24 10:52:15.000000000 +0200 @@ -1,0 +2,40 @@ +Thu Jul 24 09:59:24 CEST 2008 - mt@suse.de + +- new version 0.71.1 +- Improved ifcfg-tunnel.5 manual page, added tun/tap examples, + changed TUNNEL_SET_PERSISTENT default to 'yes'; non-persistent + tunnels are not supported yet (fate#302184). + +------------------------------------------------------------------- +Mon Jul 21 11:31:35 CEST 2008 - hare@suse.de + +- Update hwcfg2rules script to cover all S/390 devices + (fate#304939) +- Fix RPM build errors + +------------------------------------------------------------------- +Mon Jul 14 13:59:32 CEST 2008 - mt@suse.de + +- Fixed typo in ethtool retcode check in ifup (bnc#405434). + +------------------------------------------------------------------- +Wed Jun 25 10:55:42 CEST 2008 - mt@suse.de + +- Removed sentence about writing of udev rules (bnc#399224), + added info about module options in /etc/modprobe.conf.local +- Added check if the dhcpcd client is still running in the + DHCLIENT_WAIT_AT_BOOT wait loop. +- Added fix adding -p dhcpcd option to avoid deconfiguration + of the interface at startup in nfsroot case (bnc#397484) +- Fixed typo in ifup-tunnel while applying TUNNEL_SET_GROUP + +------------------------------------------------------------------- +Thu May 29 17:57:36 CEST 2008 - mt@suse.de + +- new version 0.71.0 +- Moved static ip tunnel support to scripts/ifup-tunnel, added + basic tun/tap support, updated ifcfg-tunnel(5) manual page. +- Fixes to avoid usage of utilities from /usr, because /usr may + be mounted via nfs (bnc#285472). + +------------------------------------------------------------------- Old: ---- sysconfig-0.70.8.tar.bz2 New: ---- sysconfig-0.71.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sysconfig.spec ++++++ --- /var/tmp/diff_new_pack.U21470/_old 2008-07-25 17:04:34.000000000 +0200 +++ /var/tmp/diff_new_pack.U21470/_new 2008-07-25 17:04:34.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package sysconfig (Version 0.70.8) +# spec file for package sysconfig (Version 0.71.1) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -12,7 +12,7 @@ Name: sysconfig -Version: 0.70.8 +Version: 0.71.1 Release: 1 Summary: The sysconfig scheme Group: System/Base @@ -209,15 +209,44 @@ %{fillup_and_insserv -fY network} %{fillup_only -dns dhcp network network} %{fillup_only -dns config network network} -%run_ldconfig +/sbin/ldconfig echo "Removing old autogenerated device configuration files:" rm -vf $(grep -sl "HOTPLUG-FLAG: *autocreated" /etc/sysconfig/hardware/hwcfg-*) rm -vf /etc/sysconfig/storage %postun %{insserv_cleanup} +/sbin/ldconfig + +%preun +%{stop_on_removal network} %changelog +* Thu Jul 24 2008 mt@suse.de +- new version 0.71.1 +- Improved ifcfg-tunnel.5 manual page, added tun/tap examples, + changed TUNNEL_SET_PERSISTENT default to 'yes'; non-persistent + tunnels are not supported yet (fate#302184). +* Mon Jul 21 2008 hare@suse.de +- Update hwcfg2rules script to cover all S/390 devices + (fate#304939) +- Fix RPM build errors +* Mon Jul 14 2008 mt@suse.de +- Fixed typo in ethtool retcode check in ifup (bnc#405434). +* Wed Jun 25 2008 mt@suse.de +- Removed sentence about writing of udev rules (bnc#399224), + added info about module options in /etc/modprobe.conf.local +- Added check if the dhcpcd client is still running in the + DHCLIENT_WAIT_AT_BOOT wait loop. +- Added fix adding -p dhcpcd option to avoid deconfiguration + of the interface at startup in nfsroot case (bnc#397484) +- Fixed typo in ifup-tunnel while applying TUNNEL_SET_GROUP +* Thu May 29 2008 mt@suse.de +- new version 0.71.0 +- Moved static ip tunnel support to scripts/ifup-tunnel, added + basic tun/tap support, updated ifcfg-tunnel(5) manual page. +- Fixes to avoid usage of utilities from /usr, because /usr may + be mounted via nfs (bnc#285472). * Fri May 23 2008 mt@suse.de - new version 0.70.8 - Improved ifup-bridge script reliability and allow that the ++++++ sysconfig-0.70.8.tar.bz2 -> sysconfig-0.71.1.tar.bz2 ++++++ ++++ 1830 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/ChangeLog new/sysconfig-0.71.1/ChangeLog --- old/sysconfig-0.70.8/ChangeLog 2008-05-23 12:01:49.000000000 +0200 +++ new/sysconfig-0.71.1/ChangeLog 2008-07-24 10:51:34.000000000 +0200 @@ -1,55 +1,164 @@ ------------------------------------------------------------------------ -r1665 | mt | 2008-05-23 11:59:05 +0200 (Fri, 23 May 2008) | 2 lines +r1677 | mt | 2008-07-14 14:06:54 +0200 (Mon, 14 Jul 2008) | 2 lines Changed paths: - M /branches/opensuse-11.0 - M /branches/opensuse-11.0/VERSION - M /branches/opensuse-11.0/package/sysconfig.changes + M /trunk/package/sysconfig.changes + M /trunk/scripts/ifup + +- Fixed typo in ethtool retcode check in ifup (bnc#405434). + +------------------------------------------------------------------------ +r1675 | mt | 2008-06-25 10:57:07 +0200 (Wed, 25 Jun 2008) | 2 lines +Changed paths: + M /trunk/package/sysconfig.changes + +- updated sysconfig.changes + +------------------------------------------------------------------------ +r1674 | mt | 2008-06-24 13:40:06 +0200 (Tue, 24 Jun 2008) | 3 lines +Changed paths: + M /trunk/doc/README.hwcfg_and_device_initialisation + +- Removed sentence about writing of udev rules (bnc#399224), + added info about module options in /etc/modprobe.conf.local + +------------------------------------------------------------------------ +r1673 | mt | 2008-06-24 13:35:58 +0200 (Tue, 24 Jun 2008) | 5 lines +Changed paths: + M /trunk/scripts/ifup-dhcp -- new version 0.70.8, updated sysconfig.changes +- Added fix adding -p dhcpcd option to avoid deconfiguration + of the interface at startup in nfsroot case (bnc#397484) +- Added check if the dhcpcd client is still running in the + DHCLIENT_WAIT_AT_BOOT wait loop. ------------------------------------------------------------------------ -r1664 | mt | 2008-05-23 11:51:35 +0200 (Fri, 23 May 2008) | 4 lines +r1672 | mt | 2008-06-24 13:31:30 +0200 (Tue, 24 Jun 2008) | 2 lines Changed paths: - M /branches/opensuse-11.0/scripts/ifup-bridge + M /trunk/scripts/ifup-tunnel + +- Fixed typo while applying TUNNEL_SET_GROUP + +------------------------------------------------------------------------ +r1671 | mt | 2008-05-29 23:21:56 +0200 (Thu, 29 May 2008) | 2 lines +Changed paths: + M /trunk/package/sysconfig.changes -- Merged ifup-bridge script from trunk, that improves its - reliability and allow that the bridge exists, e.g. because - created by xen (bnc#378595). +- updated sysconfig.changes -- version 0.71.0 ------------------------------------------------------------------------ -r1662 | mt | 2008-05-22 08:43:17 +0200 (Thu, 22 May 2008) | 6 lines +r1670 | mt | 2008-05-29 17:53:27 +0200 (Thu, 29 May 2008) | 3 lines Changed paths: - M /branches/opensuse-11.0/config/sysconfig.dhcp-network + M /trunk/doc/ifcfg-tunnel.5 + M /trunk/scripts/Makefile.am + M /trunk/scripts/functions + M /trunk/scripts/ifup + A /trunk/scripts/ifup-tunnel + M /trunk/scripts/network + +- Moved tunnel support to scripts/ifup-tunnel, + added basic tun/tap support + +------------------------------------------------------------------------ +r1669 | mt | 2008-05-29 17:52:26 +0200 (Thu, 29 May 2008) | 2 lines +Changed paths: + M /trunk/scripts/extradebug + +- Improved scripts/extradebug + +------------------------------------------------------------------------ +r1668 | mt | 2008-05-28 09:36:05 +0200 (Wed, 28 May 2008) | 3 lines +Changed paths: + M /trunk/doc/ifcfg-tunnel.5 + +- Replaced obsolete TUNNEL_LOCAL_INTERFACE usage in the + ifcfg-sit1 example as well (bnc#384073). + +------------------------------------------------------------------------ +r1667 | mt | 2008-05-28 09:20:28 +0200 (Wed, 28 May 2008) | 2 lines +Changed paths: + M /trunk/package/sysconfig.changes + +- Merged in changes from branches/opensuse-11.0 -- Merged from trunk: - Increased DHCLIENT_WAIT_AT_BOOT to 15 and added comment note, +------------------------------------------------------------------------ +r1663 | mt | 2008-05-23 11:46:33 +0200 (Fri, 23 May 2008) | 2 lines +Changed paths: + M /trunk/scripts/ifup-bridge + +- Improved error message printing in ifup-bridge + +------------------------------------------------------------------------ +r1660 | mt | 2008-05-20 10:47:15 +0200 (Tue, 20 May 2008) | 2 lines +Changed paths: + M /trunk/VERSION + +- bumped version to 0.71.0 + +------------------------------------------------------------------------ +r1659 | mt | 2008-05-19 17:20:15 +0200 (Mon, 19 May 2008) | 2 lines +Changed paths: + M /trunk/scripts/network + +- Improved slave skip comment in mandatory collect loop. + +------------------------------------------------------------------------ +r1658 | mt | 2008-05-19 17:17:07 +0200 (Mon, 19 May 2008) | 3 lines +Changed paths: + M /trunk/scripts/ifup-bridge + +- Improved ifup-bridge script to allow that the bridge + already exists (bnc#378595). + +------------------------------------------------------------------------ +r1657 | mt | 2008-05-19 17:11:50 +0200 (Mon, 19 May 2008) | 3 lines +Changed paths: + M /trunk/scripts/functions + M /trunk/scripts/ifup-bridge + M /trunk/scripts/ifup-wireless + +- Fixes to avoid usage of utilities from /usr, because + /usr may be mounted via nfs (bnc#285472). + +------------------------------------------------------------------------ +r1656 | mt | 2008-05-19 17:08:49 +0200 (Mon, 19 May 2008) | 5 lines +Changed paths: + M /trunk/config/sysconfig.dhcp-network + +- Increased DHCLIENT_WAIT_AT_BOOT to 15 and added comment note, that RFC 2131 specifies, that the dhcp client should wait a random time between one and ten seconds to desynchronize the use of DHCP at startup (bnc#390676). ------------------------------------------------------------------------ -r1661 | mt | 2008-05-22 08:42:23 +0200 (Thu, 22 May 2008) | 4 lines +r1655 | mt | 2008-05-19 16:49:20 +0200 (Mon, 19 May 2008) | 4 lines Changed paths: - M /branches/opensuse-11.0/scripts/ifup - M /branches/opensuse-11.0/scripts/network + M /trunk/scripts/ifup + M /trunk/scripts/network -- Merged rcnetwork reload fix from trunk to delete [vlan] interfaces - when the ifcfg file got deleted and honor the -o skip option for - the non-physical interfaces (bnc#346566). +- Fixed rcnetwork reload to delete vlan interfaces when + the ifcfg file got deleted and honor -o skip for non- + physical interfaces (bnc#346566). ------------------------------------------------------------------------ -r1652 | mt | 2008-05-16 12:32:47 +0200 (Fri, 16 May 2008) | 2 lines +r1654 | mt | 2008-05-19 16:41:50 +0200 (Mon, 19 May 2008) | 2 lines Changed paths: - A /branches/opensuse-11.0 (from /tags/version-0.70.7:1651) + M /trunk/scripts/netcontrol_global_hooks -- Created 11.0 branch +- Removed obsolete get_config_name function call ------------------------------------------------------------------------ -r1650 | mt | 2008-05-14 13:50:24 +0200 (Wed, 14 May 2008) | 2 lines +r1651 | mt | 2008-05-14 15:52:34 +0200 (Wed, 14 May 2008) | 2 lines Changed paths: - A /tags/version-0.70.7 (from /trunk:1649) + M /trunk/Makefile.am + M /trunk/config/Makefile.am + M /trunk/config/hardware/Makefile.am + M /trunk/doc/Makefile.am + M /trunk/package/Makefile.am + M /trunk/scripts/Makefile.am + M /trunk/scripts/hardware/Makefile.am + M /trunk/tools/Makefile.am -- Tagged version 0.70.7 +- Added MAINTAINERCLEANFILES ------------------------------------------------------------------------ r1649 | mt | 2008-05-14 13:49:35 +0200 (Wed, 14 May 2008) | 2 lines diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/config/hardware/Makefile.am new/sysconfig-0.71.1/config/hardware/Makefile.am --- old/sysconfig-0.70.8/config/hardware/Makefile.am 2008-05-20 13:08:22.000000000 +0200 +++ new/sysconfig-0.71.1/config/hardware/Makefile.am 2008-07-24 09:21:31.000000000 +0200 @@ -1,5 +1,8 @@ ## Process this file with automake to produce Makefile.in +CLEANFILES = *~ +MAINTAINERCLEANFILES = Makefile.in + modprobe_DATA = blacklist EXTRA_DIST = $(modprobe_DATA) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/config/Makefile.am new/sysconfig-0.71.1/config/Makefile.am --- old/sysconfig-0.70.8/config/Makefile.am 2008-05-20 13:08:22.000000000 +0200 +++ new/sysconfig-0.71.1/config/Makefile.am 2008-07-24 09:21:31.000000000 +0200 @@ -1,5 +1,8 @@ ## Process this file with automake to produce Makefile.in +CLEANFILES = *~ +MAINTAINERCLEANFILES = Makefile.in + SUBDIRS = hardware sysconfig_network_DATA = ifcfg.template \ @@ -37,3 +40,4 @@ ln -s ../../../init.d/ypbind $(DESTDIR)$(prefix)@sysconfig_networkdir@/ifservices.template/S30ypbind ln -s ../../../init.d/autofs $(DESTDIR)$(prefix)@sysconfig_networkdir@/ifservices.template/S40autofs chmod 644 $(DESTDIR)$(prefix)@omc_svcinfodir@/network.xml + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/doc/ifcfg-tunnel.5 new/sysconfig-0.71.1/doc/ifcfg-tunnel.5 --- old/sysconfig-0.70.8/doc/ifcfg-tunnel.5 2008-05-20 13:08:22.000000000 +0200 +++ new/sysconfig-0.71.1/doc/ifcfg-tunnel.5 2008-07-24 09:58:16.000000000 +0200 @@ -12,28 +12,57 @@ .B /etc/sysconfig/network/ifcfg-ipip* .br .B /etc/sysconfig/network/ifcfg-sit* +.br + +.B /etc/sysconfig/network/ifcfg-tun* +.br +.B /etc/sysconfig/network/ifcfg-tap* .SH Tunnel interfaces -It is -possible to create tunnel interfaces for three different protocols: +It is possible to create static IP tunnel interfaces for three different +protocols: +.RS +.PD 0 +.TP .I SIT -(IPv6 over IPv4 tunnel), +IPv6 over IPv4 tunnel +.TP .I GRE -(universal IPv4 tunnel) and +universal IPv4 tunnel +.TP .I IPIP -(IPv4 over IPv4 tunnel). Since there is not yet a YaST2 support for creating -tunnels one must write appropriate config files by hand for now. +IPv4 over IPv4 tunnel +.PD +.RE + +Additionally, also creation of user space program driven tunnels using +the universal TUN/TAP device driver is supported: +.RS +.PD 0 +.TP +.I TAP +Ethernet tunnel interface +.TP +.I TUN +Point-to-Point IP tunnel interface +.PD +.RE + +Since there is not yet a YaST2 support for creating tunnels one must +write appropriate config files by hand for now. -These new variables are to be used in tunnel config files: +.SH VARIABLES +These variables can used in ip tunnel config files: .TP .B TUNNEL Here you have to set the tunnel protocol. This may be "sit" for IPv6 over IPv4 -tunnel, "gre" for universal IPv4 tunnel and "ipip" for IPv4 over IPv4 tunnel. +tunnel, "gre" for universal IPv4 tunnel, "ipip" for IPv4 over IPv4 tunnel and +"tap" or "tun" for the user space program driven tunnels. .TP .BR TUNNEL_LOCAL_IPADDR \ or \ TUNNEL_DEVICE The address of the local tunnel's end could be directly specified in .B TUNNEL_LOCAL_IPADDR -variable. The address must be present on another interface of this host +variable. The address must be present on an existing interface of this host (the TUNNEL_DEVICE). If .B TUNNEL_LOCAL_IPADDR is empty the first ipv4 address from the interface given in the variable @@ -54,7 +83,14 @@ .B TUNNEL_OPTIONS Here you may set additional options for the command .B ip tunnel add - +.TP +.B TUNNEL_SET_PERSISTENT +Create a persistent tun or tap interface. Default is "yes". +Non-persistent tunnels are not supported yet. +.TP +.BR TUNNEL_SET_OWNER \ and \ TUNNEL_SET_GROUP +Allows to set the owner and group (by name or UID/GID) for persistent +tun/tap interfaces. .SH Examples for tunnel configurations This are some generic examples for different tunnel types. Replace the shown addresses and interface names by your individual ones. As configuration names @@ -102,7 +138,7 @@ STARTMODE='onboot' BOOTPROTO='6to4' TUNNEL='sit' - TUNNEL_LOCAL_INTERFACE='eth0' + TUNNEL_DEVICE='eth0' TUNNEL_TTL='64' .fi Additionally you need to set some routes. Do that in a file called @@ -129,6 +165,52 @@ TUNNEL_TTL='64' .fi +.TP +.B Universal TUN/TAP tunnels +The universal TUN/TAP kernel driver provides an interface for user +space programs to operate a tunnel. There are two modes in which +the interface can be created: +.nf + TUN (a Point-to-Point interface using local and remote IP) or + TAP (like normal ethernet interface, e.g. for use in bridges). +.fi + +The following configuration allows to create the interfaces +persistently: + +.I ifcfg-tap0 +.nf + STARTMODE='onboot' + BOOTPROTO='static' + TUNNEL='tap' + # optionally: + TUNNEL_SET_PERSISTENT='yes' + TUNNEL_SET_OWNER='username' + TUNNEL_SET_GROUP='groupname' +.fi + +.I ifcfg-tun0 +.nf + STARTMODE='onboot' + BOOTPROTO='static' + TUNNEL='tun' + # optionally: + TUNNEL_SET_PERSISTENT='yes' + TUNNEL_SET_OWNER='username' + TUNNEL_SET_GROUP='groupname' +.fi + +The user space program can be started later, e.g. by the +.BR ifservices (5) +mechanism. The TUNNEL_SET_OWNER and TUNNEL_SET_GROUP settings +allow to run the user space program with an different UID/GID +than 0 (root). When not specified, the user space program has +to run with UID 0. + +Non-persistent tunnels (TUNNEL_SET_PERSISTENT=no), where the +user space program (e.g. openvpn) is started directly in ifup, +are not supported yet. + .SH BUGS Please report bugs at <http://www.suse.de/feedback> .SH AUTHOR diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/doc/Makefile.am new/sysconfig-0.71.1/doc/Makefile.am --- old/sysconfig-0.70.8/doc/Makefile.am 2008-05-20 13:08:22.000000000 +0200 +++ new/sysconfig-0.71.1/doc/Makefile.am 2008-07-24 09:21:32.000000000 +0200 @@ -1,5 +1,8 @@ ## Process this file with automake to produce Makefile.in +CLEANFILES = *~ +MAINTAINERCLEANFILES = Makefile.in + man_MANS = ifup.8 \ ifdown.8 \ ifservices.5 \ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/doc/README.hwcfg_and_device_initialisation new/sysconfig-0.71.1/doc/README.hwcfg_and_device_initialisation --- old/sysconfig-0.70.8/doc/README.hwcfg_and_device_initialisation 2008-05-20 13:08:22.000000000 +0200 +++ new/sysconfig-0.71.1/doc/README.hwcfg_and_device_initialisation 2008-07-24 09:21:32.000000000 +0200 @@ -12,9 +12,7 @@ be honest, there is still a /sbin/hwup but it changed completely. See below.) The automatic module loading did not change much. The only difference is that -udev calls 'modprobe $MODALIAS' directly and not via /bin/hwup as before. If -you want to load another driver for a device now you have to write a udev rule -instead. +udev calls 'modprobe $MODALIAS' directly and not via /bin/hwup as before. To learn more about this topic have a look at these files, man-pages and tools: - /etc/udev/rules.d/80-drivers.rules @@ -25,13 +23,19 @@ - man modprobe - modprobe -nv --show-depends `cat /sys/bus/pci/devices/..../modalias` +Module parameters can be specified in /etc/modprobe.conf.local, e.g. as: + + options <module name> <module options> About the new /sbin/hwup: Have a look at this short shell script to learn more about manual driver binding. This script may be used to manually unbind and bind drivers to devices. -For example if you want to change a network interface name, do this: + +For example if you want to change a network interface name, do this in +yast2 network or: - change the name in /etc/udev/rules.d/70-persistent-net.rules - call 'hwdown <old iface name>' - call 'hwup <old iface name>' - check result with 'ip a' + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/Makefile.am new/sysconfig-0.71.1/Makefile.am --- old/sysconfig-0.70.8/Makefile.am 2008-05-20 13:08:23.000000000 +0200 +++ new/sysconfig-0.71.1/Makefile.am 2008-07-24 09:21:33.000000000 +0200 @@ -6,6 +6,12 @@ AUTOMAKE_OPTIONS = foreign dist-bzip2 CLEANFILES = *~ +MAINTAINERCLEANFILES = aclocal.m4 config.guess config.sub \ + configure depcomp install-sh ltmain.sh Makefile.in missing \ + sysconfig-$(VERSION).tar.bz2 sysconfig-$(VERSION).tar.gz + +maintainer-clean-local: + -rm -rf autom4te.cache SUBDIRS = doc scripts tools config package diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/package/Makefile.am new/sysconfig-0.71.1/package/Makefile.am --- old/sysconfig-0.70.8/package/Makefile.am 2008-05-20 13:08:23.000000000 +0200 +++ new/sysconfig-0.71.1/package/Makefile.am 2008-07-24 09:21:33.000000000 +0200 @@ -1,4 +1,7 @@ ## Process this file with automake to produce Makefile.in +CLEANFILES = *~ +MAINTAINERCLEANFILES = Makefile.in + noinst_DATA = sysconfig.spec diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/package/sysconfig.spec.in new/sysconfig-0.71.1/package/sysconfig.spec.in --- old/sysconfig-0.70.8/package/sysconfig.spec.in 2008-05-20 13:08:23.000000000 +0200 +++ new/sysconfig-0.71.1/package/sysconfig.spec.in 2008-07-24 10:42:06.000000000 +0200 @@ -208,12 +208,16 @@ %{fillup_and_insserv -fY network} %{fillup_only -dns dhcp network network} %{fillup_only -dns config network network} -%run_ldconfig +/sbin/ldconfig echo "Removing old autogenerated device configuration files:" rm -vf $(grep -sl "HOTPLUG-FLAG: *autocreated" /etc/sysconfig/hardware/hwcfg-*) rm -vf /etc/sysconfig/storage %postun %{insserv_cleanup} +/sbin/ldconfig + +%preun +%{stop_on_removal network} %changelog -n sysconfig diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/scripts/extradebug new/sysconfig-0.71.1/scripts/extradebug --- old/sysconfig-0.70.8/scripts/extradebug 2008-05-20 13:08:23.000000000 +0200 +++ new/sysconfig-0.71.1/scripts/extradebug 2008-07-24 09:21:33.000000000 +0200 @@ -6,7 +6,11 @@ # boot.udev to start cleanly when booting. SCRIPT=${0##*/} -exec 2> /tmp/exdeb.${SCRIPT}_$$.$PPID.${SEQNUM}_$1.$2 + +. /etc/sysconfig/network/scripts/functions.common +test -d $RUN_FILES_BASE && dir=$RUN_FILES_BASE || dir=/ +exec 2> $dir/exdeb.${SCRIPT}_$$.$PPID.${SEQNUM}_$1.$2 + date +"%F %T.%N" >&2 echo -------------------------------------------------- >&2 ps axwfu | head -1 >&2 @@ -16,7 +20,7 @@ echo -------------------------------------------------- >&2 ls -ltr --full-time /sys/class/net /dev/shm/sysconfig >&2 echo >&2 -grep -H "" /dev/shm/sysconfig/* >&2 +grep -H "" $(ls -1d /dev/shm/sysconfig/* | grep -v "[/]exdeb") >&2 echo -------------------------------------------------- >&2 ip a >&2 ip r >&2 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/scripts/functions new/sysconfig-0.71.1/scripts/functions --- old/sysconfig-0.70.8/scripts/functions 2008-05-20 13:08:23.000000000 +0200 +++ new/sysconfig-0.71.1/scripts/functions 2008-07-24 09:21:33.000000000 +0200 @@ -22,7 +22,7 @@ # Authors: Michal Svec <msvec@suse.cz> # Mads Martin Joergensen <mmj@suse.de> # -# $Id: functions 1647 2008-05-14 11:46:52Z mt $ +# $Id: functions 1670 2008-05-29 15:53:27Z mt $ # . /etc/sysconfig/network/scripts/functions.common @@ -35,7 +35,7 @@ # # to test the next two functions: # -# for i in $(seq 0 32); do +# for i in {0..32}; do # echo $i: $(pfxlen2mask $i) " ---> " $(mask2pfxlen $(pfxlen2mask $i)) # done @@ -84,7 +84,7 @@ ippp*|isdn*) return 0 ;; modem*|dsl*|ppp*) return 0 ;; vlan*) return 0 ;; - sit*|gre*|ipip*) return 0 ;; + sit*|gre*|ipip*|tun*|tap*) return 0 ;; esac test "${SCRIPTNAME%%-*}" = ifdown -a "$MODE" = hotplug && return 0 test "${SCRIPTNAME%%-*}" = ifup -a "$BONDING_MASTER" = yes && return 0 @@ -101,29 +101,56 @@ esac } +get_ethtool_drv_info () { + test -n "$1" || return 1 + local ethtool="/sbin/ethtool" + if [ ! -x $ethtool ] ; then + [ -x /usr${ethtool} ] && ethtool="/usr${ethtool}" || return 1 + fi + $ethtool -i "$IF" 2>/dev/null | + while read key val ; do + case "$key" in + driver:) printf 'ETHTOOL_DRV_NAME=%q\n' "$val" ;; + version:) printf 'ETHTOOL_DRV_VERSION=%q\n' "$val" ;; + firmware-version:) printf 'ETHTOOL_DRV_FW_VERSION=%q\n' "$val" ;; + bus-info:) printf 'ETHTOOL_DRV_BUS_INFO=%q\n' "$val" ;; + esac + done 2>/dev/null # bash printf required for %q format +} + get_iface_type () { local IF=$1 TYPE test -n "$IF" || return 1 test -d /sys/class/net/$IF || return 2 case "`cat /sys/class/net/$IF/type`" in - 1) TYPE=eth # Ethernet, may also be wireless - test -d /sys/class/net/$IF/wireless && TYPE=wlan - test -d /sys/class/net/$IF/bridge && TYPE=bridge - test -f /proc/net/vlan/$IF && TYPE=vlan - test -d /sys/class/net/$IF/bonding && TYPE=bond ;; - 24) TYPE=eth ;; # firewire ;; # IEEE 1394 IPv4 - RFC 2734 - 32) TYPE=eth ;; # InfiniBand, treat it like ethernet? - 512) TYPE=ppp ;; - 768) TYPE=ipip ;; # IPIP tunnel - 769) TYPE= ;; # IP6IP6 tunnel - 772) TYPE=lo ;; - 776) TYPE=sit ;; # sit0 device - IPv6-in-IPv4 - 778) TYPE=gre ;; # GRE over IP - 783) TYPE=irda ;; # Linux-IrDA - 801) TYPE=wlan_aux ;; + 1) + TYPE=eth # Ethernet, may also be wireless + test -d /sys/class/net/$IF/wireless && TYPE=wlan + test -d /sys/class/net/$IF/bridge && TYPE=bridge + test -f /proc/net/vlan/$IF && TYPE=vlan + test -d /sys/class/net/$IF/bonding && TYPE=bond + test -d /sys/devices/virtual/net/$IF && { + eval local `get_ethtool_drv_info $IF` + test "$ETHTOOL_DRV_NAME" == "tun" && \ + TYPE="$ETHTOOL_DRV_BUS_INFO" || \ + case $IF in tap*) TYPE=tap ;; esac + # may be another virtual eth iface + } + ;; + 24) TYPE=eth ;; # firewire ;; # IEEE 1394 IPv4 - RFC 2734 + 32) TYPE=eth ;; # InfiniBand, treat it like ethernet? + 512) TYPE=ppp ;; + 768) TYPE=ipip ;; # IPIP tunnel + 769) TYPE= ;; # IP6IP6 tunnel + 772) TYPE=lo ;; + 776) TYPE=sit ;; # sit0 device - IPv6-in-IPv4 + 778) TYPE=gre ;; # GRE over IP + 783) TYPE=irda ;; # Linux-IrDA + 801) TYPE=wlan_aux ;; + 65534) TYPE=tun ;; esac - # The following case statement still has to be replaced by something which - # does not rely on the interface names. + # The following case statement still has to be replaced by something + # which does not rely on the interface names. case $IF in ippp*|isdn*) TYPE=isdn;; ip6tnl*) TYPE=ip6tnl;; # This might be type 769 ... @@ -158,6 +185,8 @@ BONDING_MASTER yes bond ETHERDEVICE _not_empty_ vlan BRIDGE yes bridge + TUNNEL tap tap + TUNNEL tun tun TUNNEL sit sit TUNNEL gre gre TUNNEL ipip ipip @@ -204,13 +233,12 @@ convert_6to4_to_ipv4address () { ADDR=$1 - PART_1=`expr $ADDR : '2002:\([^:]*\):[^:]*:'` - PART_2=`expr $ADDR : '2002:[^:]*:\([^:]*\):'` - if [ "$PART_1" = "" -o "$PART_2" = "" ]; then + LIST=($(IFS=:; echo $ADDR)) + if [ ${#LIST[@]} -ne 4 -o "${LIST[0]}" != "2002" ] ; then echo $ADDR fi - NORM_1=`printf "%04x" 0x$PART_1` - NORM_2=`printf "%04x" 0x$PART_2` + NORM_1=`printf "%04x" 0x${LIST[1]} 2>/dev/null` + NORM_2=`printf "%04x" 0x${LIST[2]} 2>/dev/null` printf "::%u.%u.%u.%u" \ 0x${NORM_1:0:2} 0x${NORM_1:2:2} \ @@ -240,7 +268,7 @@ /sbin/modprobe bonding # If we add module option max_bonds=0 in the modprobe command above then # we may skip the following lines in this if-fi block. - for a in `seq 33`; do + for a in {1..33}; do test -r /sys/class/net/bonding_masters && break usleep 300000 done @@ -252,7 +280,7 @@ if [ ! -d /sys/class/net/$IF/bonding ] ; then echo "+$IF" > /sys/class/net/bonding_masters fi - for a in `seq 33`; do + for a in {1..33}; do test -d /sys/class/net/$IF/bonding && break usleep 300000 done @@ -287,7 +315,7 @@ err_mesg "Option '$OPT_NAME': can't remove $a" fi done - for a in `echo "$OPT_VALUE" | tr ',' ' '` ; do + for a in ${OPT_VALUE//,/ } ; do if ! echo "+$a" > /sys/class/net/$IF/bonding/$OPT_NAME ; then err_mesg "Option '$OPT_NAME': can't add $a" fi diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/scripts/hardware/hwcfg2rules new/sysconfig-0.71.1/scripts/hardware/hwcfg2rules --- old/sysconfig-0.70.8/scripts/hardware/hwcfg2rules 2008-05-20 13:08:22.000000000 +0200 +++ new/sysconfig-0.71.1/scripts/hardware/hwcfg2rules 2008-07-24 10:37:21.000000000 +0200 @@ -13,10 +13,60 @@ cat >> $file <<EOF ACTION=="add", SUBSYSTEM=="$bus", KERNEL=="$busid", IMPORT{program}="collect $busid %k $busid $ccwtype-$subtype" ACTION=="add", SUBSYSTEM=="drivers", KERNEL=="$ccwtype-$subtype", IMPORT{program}="collect $busid %k $busid $ccwtype-$subtype" -ACTION=="add", ENV{COLLECT_$busid}=="0", ATTR{[ccw/0.0.0150]online}="1" +ACTION=="add", ENV{COLLECT_$busid}=="0", ATTR{[ccw/$busid]online}="1" EOF } +write_zfcp_rules () { + local file=$UDEVDIR/$RULE-$type-${busid}.rules + + echo "# Rules converted from $cfgname" > $file + cat >> $file <<EOF +ACTION=="add", SUBSYSTEM=="$bus", KERNEL=="$busid", IMPORT{program}="collect $busid %k $busid zfcp" +ACTION=="add", SUBSYSTEM=="drivers", KERNEL=="zfcp", IMPORT{program}="collect $busid %k $busid zfcp" +EOF + for lun in $ZFCP_LUNS ; do + set -- $(IFS=: ; echo $lun) + tmpwwpn=$1 + for wwpn in $wwpn_list ; do + if [ "$wwpn" == "$1" ] ; then + tmpwwpn= + fi + done + if [ -n "$tmpwwpn" ] ; then + wwpn_list="$wwpn_list $tmpwwpn" + fi + done + for wwpn in $wwpn_list ; do + cat >> $file <<EOF +ACTION=="add", ENV{COLLECT_$busid}=="0", ATTR{[ccw/$busid]port_add}="$wwpn" +EOF + done + cat >> $file <<EOF +ACTION=="add", ENV{COLLECT_$busid}=="0", ATTR{[ccw/$busid]online}="1" +EOF + for lunid in $ZFCP_LUNS ; do + set -- $(IFS=: ; echo $lunid) + wwpn=$1 + lun=$2 + cat >> $file <<EOF +ACTION=="add", SUBSYSTEMS=="ccw", KERNELS=="$busid", TEST=="[ccw/$busid]$wwpn", ATTR{[ccw/$busid]$wwpn/unit_add}="$lun" +EOF + done + +} + +write_iucv_rules () { + local file=$UDEVDIR/$RULE-$type-${id}.rules + local attr + + echo "# Rules converted from $cfgname" > $file + cat >> $file <<EOF +ACTION=="add", SUBSYSTEM=="bus", KERNEL=="iucv", RUN+="modprobe netiucv" +ACTION=="add", SUBSYSTEM=="drivers", KERNEL=="netiucv", ATTR{connection}="$id" +EOF +} + write_ctc_rules () { local file=$UDEVDIR/$RULE-$type-${busid}.rules local attr @@ -155,6 +205,9 @@ bus=$1 busid=$2 ;; + id) + id=$1; + ;; *) echo "Unhandled configuration type \"$devtype\"" exit 1 @@ -162,6 +215,7 @@ esac [ "$bus" ] && [ -z "$busid" ] && echo "No bus ID given" && exit 1 +[ "$devtype" = "id" ] && [ -z "$id" ] && echo "No ID given" && exit 1 if [ "$bus" = "ccw" ] ; then if [ -z "$ccwtype" ] ; then @@ -248,6 +302,9 @@ dasd) write_dasd_rules ;; + zfcp) + write_zfcp_rules + ;; ctc|lcs) write_ctc_rules ;; @@ -259,5 +316,13 @@ ;; esac else - echo "Unknown bus type $bus" + if [ -z "$bus" ] ; then + if [ "$type" = "iucv" ] ; then + write_iucv_rules + else + echo "Unknown type $type" + fi + else + echo "Unknown bus type $bus" + fi fi diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/scripts/hardware/Makefile.am new/sysconfig-0.71.1/scripts/hardware/Makefile.am --- old/sysconfig-0.70.8/scripts/hardware/Makefile.am 2008-05-20 13:08:22.000000000 +0200 +++ new/sysconfig-0.71.1/scripts/hardware/Makefile.am 2008-07-24 09:21:33.000000000 +0200 @@ -1,5 +1,8 @@ ## Process this file with automake to produce Makefile.in +CLEANFILES = *~ +MAINTAINERCLEANFILES = Makefile.in + sbin_SCRIPTS = hwup sysconfig_hardware_SCRIPTS = hwcfg2rules diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/scripts/ifup new/sysconfig-0.71.1/scripts/ifup --- old/sysconfig-0.70.8/scripts/ifup 2008-05-22 08:42:24.000000000 +0200 +++ new/sysconfig-0.71.1/scripts/ifup 2008-07-24 10:02:13.000000000 +0200 @@ -25,7 +25,7 @@ # Bjoern Jacke # Michal Ludvig <mludvig@suse.cz> # -# $Id: ifup 1661 2008-05-22 06:42:23Z mt $ +# $Id: ifup 1678 2008-07-24 08:02:12Z mt $ # usage () { @@ -75,7 +75,7 @@ test -f ./config && . ./config test -f scripts/functions && . scripts/functions || exit $R_INTERNAL -# . scripts/extradebug +test "$DEBUG" = "EXTRA" && . scripts/extradebug ###################################################################### # Commandline parsing @@ -499,6 +499,8 @@ fi if [ -n "$DEVNAME" ] ; then message "`printf " %-9s device: %s" $INTERFACE "$DEVNAME"`" +elif [ -n "$NAME" -a -z "$MESS_NO_IFACE" ] ; then + message "`printf " %-9s name: %s" "$INTERFACE" "$NAME"`" else message "`printf " %-9s %s" "$INTERFACE" "$MESS_NO_IFACE"`" fi @@ -670,24 +672,35 @@ scripts/${SCRIPTNAME}-connection $CONFIG $INTERFACE \ ${OPTIONS:+-o $OPTIONS} fi - - # before setting up interfaces we have to configure wireless NICs + + # FIXME: uff, cleanup cleanup cleanup + 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 - fi - - # Frob vlan interface - if [ "$SCRIPTNAME" = ifup -a "$INTERFACETYPE" = vlan ]; then - scripts/${SCRIPTNAME}-802.1q $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} - fi - # Frob bridge interface - if [ "$INTERFACETYPE" == bridge -a "$SCRIPTNAME" = ifup ]; then - scripts/${SCRIPTNAME}-bridge $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} - test "$?" -ne 0 && exit + case "$INTERFACETYPE" in + vlan) + # Frob vlan interface + scripts/${SCRIPTNAME}-802.1q $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} + test "$?" -ne 0 && exit + ;; + bridge) + # Frob bridge interface + scripts/${SCRIPTNAME}-bridge $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} + test "$?" -ne 0 && exit + ;; + ipip|sit|gre|tun|tap) + # Frob tunnel interface + scripts/${SCRIPTNAME}-tunnel $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} + test "$?" -ne 0 && exit + ;; + esac fi - + # exec if*-ppp for modem and dsl case $INTERFACETYPE in modem|dsl|ppp) @@ -729,6 +742,8 @@ services) : ;; skel) : ;; wireless) : ;; + tun|tap) : ;; + ipip|sit|gre) : ;; *) if [ -x "$INTERFACESCRIPT" ] ; then $INTERFACESCRIPT $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} @@ -769,7 +784,7 @@ MESSAGE="`$ETHTOOL $ETHTOOL_OPTIONS 2>&1`" RETCODE=$? fi - test $retcode != 0 \ + test $RETCODE != 0 \ && err_mesg "Error while executing: $ethtool $ETHTOOL_OPTIONS" \ || info_mesg "$ethtool $ETHTOOL_OPTIONS" test -n "$MESSAGE" && err_mesg "$MESSAGE" @@ -777,79 +792,10 @@ ###################################################################### -# Tunnel setup +# obsolete 6to4 tunnel hack ? # -if [ "$INTERFACETYPE" = "sit" \ - -o "$INTERFACETYPE" = "gre" \ - -o "$INTERFACETYPE" = "ipip" ]; then - - # Backwards compliance hack: - # TUNNEL_DEVICE is new since SL9.1/SLES9. Up to then TUNNEL_LOCAL_INTERFACE - # was used in configuration files - if [ -z "$TUNNEL_DEVICE" ] ; then - TUNNEL_DEVICE=$TUNNEL_LOCAL_INTERFACE - fi - # Get current interface name of tunnel device - TUNNEL_LOCAL_INTERFACE=$TUNNEL_DEVICE - - # Get IPv4 address of local tunnel endpoint - # in the case it wasn't set in the config file. - if [ -z "$TUNNEL_LOCAL_IPADDR" -a -n "$TUNNEL_LOCAL_INTERFACE" ]; then - TUNNEL_LOCAL_IPADDR=`is_iface_up $TUNNEL_LOCAL_INTERFACE && \ - get_ipv4address $TUNNEL_LOCAL_INTERFACE` - if [ "$?" != 0 ] ; then - logerror "failed to get IPv4 address of $TUNNEL_LOCAL_INTERFACE" \ - "($TUNNEL_DEVICE)" - exit $R_ERROR - fi - fi - - TUNNEL_LOCAL_IPADDR_V6=`printf "%s/16" $(convert_ipv4address_to_6to4 $TUNNEL_LOCAL_IPADDR)` - - case "$SCRIPTNAME" in - ifup) - # Create a new tunnel - MESSAGE=`ip tunnel add $INTERFACE mode "$TUNNEL" \ - ${TUNNEL_LOCAL_IPADDR:+local "$TUNNEL_LOCAL_IPADDR"} \ - ${TUNNEL_REMOTE_IPADDR:+remote "$TUNNEL_REMOTE_IPADDR"} \ - ${TUNNEL_TTL:+ttl "$TUNNEL_TTL"} $TUNNEL_OPTIONS 2>&1` - if [ $? = 0 ] ; then - : - else - logerror "failed to add tunnel $INTERFACE" - logerror "$MESSAGE" - exit $R_ERROR - fi - - MESSAGE=`ip link show $INTERFACE 2>&1` - if [ $? = 0 ] ; then - # This message shuold be printed at the very end - message_if_not_run_from_rc "tunnel $INTERFACE is configured" - else - logerror "failed to add tunnel $INTERFACE" - logerror "$MESSAGE" - logerror "(does it already exist with a different name?)" - exit $R_ERROR - fi - ;; - ifdown) - MESSAGE=`ip tunnel del $INTERFACE 2>&1` - if [ $? = 0 ] ; then - message_if_not_run_from_rc "tunnel $INTERFACE is removed" - else - logerror "failed to delete tunnel $INTERFACE" - logerror "$MESSAGE" - exit $R_ERROR - fi - ;; - esac - - # We only handle bringing up the 6to4 tunnel in a special way. - # Shutting down and querying for it's status is the same - # as for 'static' tunnels. - if [ "$BOOTPROTO" = "6to4" -a "$SCRIPTNAME" != "ifup" ]; then - BOOTPROTO="static" - fi +if [ "$BOOTPROTO" = "6to4" -a "$SCRIPTNAME" != "ifup" ]; then + BOOTPROTO="static" fi @@ -992,33 +938,8 @@ *skip) : ;; - # Configure IPv6 6to4 tunnels. 6to4) - - MESSAGE=`ip link set up dev $INTERFACE $LINK_OPTIONS 2>&1` - if [ $? != 0 ] ; then - logerror "failed to set up interface $INTERFACE" - logerror "$MESSAGE" - exit $R_ERROR - fi - - if [ -n "$MTU" ] ; then - MESSAGE=`ip link set $INTERFACE mtu $MTU 2>&1` - if [ $? !=0 ] ; then - logerror "failed to set MTU for interface $INTERFACE" - logerror "$MESSAGE" - exit $R_ERROR - fi - fi - - MESSAGE=`ip -6 addr add $TUNNEL_LOCAL_IPADDR_V6 dev $INTERFACE 2>&1` - if [ $? != 0 ] ; then - logerror "failed to add address $TUNNEL_LOCAL_IPADDR_V6 to" \ - "interface $INTERFACE" - logerror "$MESSAGE" - exit $R_ERROR - fi - + # just route, configuration handled in $SCRIPTNAME-tunnel ifup-route $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} retcode=$? ;; @@ -1237,22 +1158,31 @@ fi fi - # after shutting down interfaces ifup-wireless has to kill the wpa daemon 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} - fi - - # Frob vlan interface, part II - if [ "$SCRIPTNAME" = ifdown -a "$INTERFACETYPE" = vlan ]; then - scripts/${SCRIPTNAME}-802.1q $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} - fi - # Frob bridge interface, part II - if [ "$INTERFACETYPE" == bridge -a "$SCRIPTNAME" != ifup ]; then - scripts/${SCRIPTNAME}-bridge $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} + case "$INTERFACETYPE" in + vlan) + # Frob vlan interface, part II + scripts/${SCRIPTNAME}-802.1q $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} + test "$?" -ne 0 && exit + ;; + bridge) + # Frob bridge interface, part II + scripts/${SCRIPTNAME}-bridge $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} + test "$?" -ne 0 && exit + ;; + ipip|sit|gre|tun|tap) + # Frob tunnel interface, part II + scripts/${SCRIPTNAME}-tunnel $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} + test "$?" -ne 0 && exit + ;; + esac fi - fi ###################################################################### diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/scripts/ifup-dhcp new/sysconfig-0.71.1/scripts/ifup-dhcp --- old/sysconfig-0.70.8/scripts/ifup-dhcp 2008-05-20 13:08:23.000000000 +0200 +++ new/sysconfig-0.71.1/scripts/ifup-dhcp 2008-07-24 09:21:33.000000000 +0200 @@ -18,7 +18,7 @@ # Author: Christian Zoz <zoz@suse.de>, 2002-2006 # Peter Poeml <poeml@suse.de>, 2002-2006 # -# $Id: ifup-dhcp 1648 2008-05-14 11:48:31Z mt $ +# $Id: ifup-dhcp 1673 2008-06-24 11:35:58Z mt $ # usage () { @@ -295,6 +295,10 @@ # dhcpcd-hook/ifup machinery [#85849] args="$args -c ${DHCLIENT_SCRIPT_EXE:-/etc/sysconfig/network/scripts/dhcpcd-hook}" + + # avoid deconfiguration of the interface at startup in nfsroot case (bnc#397484) + test "$STARTMODE" == "nfsroot" && args="-p $args" + DHCLIENT_ARGS=$args # just in case /var is not mounted @@ -310,13 +314,20 @@ fi # now start dhcpcd - $DHCLIENT_BIN $DHCLIENT_ARGS $INTERFACE </dev/null &>/dev/null & + ( $DHCLIENT_BIN $DHCLIENT_ARGS $INTERFACE </dev/null ) 2>&1 | $LOGGER -p debug -t "$SCRIPTNAME" & # wait some more time until dhcpcd has done its job. # it would be easier to wait for the pidfile, but it is written later for ((i=0; i<${DHCLIENT_WAIT_AT_BOOT:-15}; i++)); do - if [ -e $info -a ! $info -ot $timestamp ]; then continue - else message_n .\ ; sleep 1 + if [ -e $info -a ! $info -ot $timestamp ]; then + continue + else + message_n .\ ; sleep 1 + fi + if ! dhcpc_on_iface -q ; then + [ $i -lt 2 ] && message_n .\ .\ + message "client NOT running" + exit $R_NOTRUNNING fi done if [ -e $info -a ! $info -ot $timestamp ]; then diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/scripts/ifup-tunnel new/sysconfig-0.71.1/scripts/ifup-tunnel --- old/sysconfig-0.70.8/scripts/ifup-tunnel 1970-01-01 01:00:00.000000000 +0100 +++ new/sysconfig-0.71.1/scripts/ifup-tunnel 2008-07-24 09:26:09.000000000 +0200 @@ -0,0 +1,300 @@ +#! /bin/bash +# +# Copyright (c) 2007 SUSE LINUX Products GmbH, 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 +# +# Authors: Marius Tomaschewski <mt@suse.de> +# Michal Ludvig <mludvig@suse.cz> +# +# The static ipip,gre,sit tunnel code extracted from main ifup script. +# +# $Id: $ +# + +usage () { + echo $@ + echo "Usage: if{up,down,status}-tunnel [<config>] <interface> [-o <options>]" + echo "" + echo "Options are:" + echo " [on]boot : we are currently booting (or shutting down)" + echo " hotplug : we are handling a hotplug event" + echo " auto : alias for onboot" + echo " debug : be verbose" + echo "" + 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 +test -f scripts/functions && . scripts/functions || exit $R_INTERNAL + +###################################################################### +# check arguments and how we are called (in case of links) +# +SCRIPTNAME=${0##*/} +debug $* +ACTION=${SCRIPTNAME#if} +ACTION=${ACTION%%-*} +case "${ACTION}" in + up|status|down|check) ;; + *) 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 ;; + *) debug unknown option $1 ;; + esac + shift +done + +###################################################################### +# check presence of configuration file and source it +# +if [ -f ifcfg-$CONFIG ] ; then + . ifcfg-$CONFIG +else + message "could not find configuration file ifcfg-$CONFIG" +fi + + +###################################################################### +# function adding a static ip tunnel +# +iptunnel_add () +{ + # Backwards compliance hack: + # TUNNEL_DEVICE is new since SL9.1/SLES9. Up to then, + # TUNNEL_LOCAL_INTERFACE was used in configurations. + if [ -z "$TUNNEL_DEVICE" ] ; then + TUNNEL_DEVICE=$TUNNEL_LOCAL_INTERFACE + fi + + # Get IPv4 address of local tunnel endpoint + # in the case it wasn't set in the config file. + if [ -z "$TUNNEL_LOCAL_IPADDR" ] ; then + if [ -z "$TUNNEL_DEVICE" ]; then + logerror "set TUNNEL_LOCAL_IPADDR or TUNNEL_DEVICE" + return $R_USAGE + fi + + TUNNEL_LOCAL_IPADDR=`is_iface_up $TUNNEL_DEVICE && \ + get_ipv4address $TUNNEL_DEVICE` + if [ "$?" != 0 ] ; then + logerror "failed to get IPv4 address of $TUNNEL_DEVICE" + return $R_ERROR + fi + fi + + # Create a new tunnel + MESSAGE=`ip tunnel add $INTERFACE mode "$TUNNEL" \ + ${TUNNEL_LOCAL_IPADDR:+local "$TUNNEL_LOCAL_IPADDR"} \ + ${TUNNEL_REMOTE_IPADDR:+remote "$TUNNEL_REMOTE_IPADDR"} \ + ${TUNNEL_TTL:+ttl "$TUNNEL_TTL"} $TUNNEL_OPTIONS 2>&1` + if [ $? != 0 ] ; then + logerror "failed to add tunnel $INTERFACE" + logerror "$MESSAGE" + return $R_ERROR + fi + + # Check if tunnel link exists (needed?) + MESSAGE=`ip link show $INTERFACE 2>&1` + if [ $? != 0 ] ; then + logerror "failed to add tunnel $INTERFACE" + logerror "$MESSAGE" + logerror "(does it already exist with a different name?)" + return $R_ERROR + fi + + case "$BOOTPROTO" in + 6to4) + # convert IPv4 to IPv6 + test -n "$TUNNEL_LOCAL_IPADDR_V6" || + TUNNEL_LOCAL_IPADDR_V6=`printf "%s/16" $(convert_ipv4address_to_6to4 $TUNNEL_LOCAL_IPADDR)` + + MESSAGE=`ip link set up dev $INTERFACE $LINK_OPTIONS 2>&1` + if [ $? != 0 ] ; then + logerror "failed to set up interface $INTERFACE" + logerror "$MESSAGE" + return $R_ERROR + fi + + if [ -n "$MTU" ] ; then + MESSAGE=`ip link set $INTERFACE mtu $MTU 2>&1` + if [ $? !=0 ] ; then + logerror "failed to set MTU for interface $INTERFACE" + logerror "$MESSAGE" + return $R_ERROR + fi + fi + + MESSAGE=`ip -6 addr add $TUNNEL_LOCAL_IPADDR_V6 dev $INTERFACE 2>&1` + if [ $? != 0 ] ; then + logerror "failed to add address $TUNNEL_LOCAL_IPADDR_V6 to" \ + " interface $INTERFACE" + logerror "$MESSAGE" + return $R_ERROR + fi + ;; + esac + + # This message shuold be printed at the very end + message_if_not_run_from_rc "$BOOTPROTO tunnel $INTERFACE is configured" + return $R_SUCCESS +} + +###################################################################### +# function deleting a static ip tunnel +# +iptunnel_del () +{ + MESSAGE=`ip tunnel del $INTERFACE 2>&1` + if [ $? = 0 ] ; then + message_if_not_run_from_rc "tunnel $INTERFACE is removed" + return $R_SUCCESS + else + logerror "failed to delete tunnel $INTERFACE" + logerror "$MESSAGE" + return $R_ERROR + fi +} +###################################################################### +# function returning the path of tunctl utility (in /usr on 10.3) +tunctl_bin () +{ + for tunctl in /bin/tunctl /usr/bin/tunctl ; do + test -x "$tunctl" && echo "$tunctl" + done + echo "" +} + +###################################################################### +# now do what has to be done +# +RETVAL=$R_SUCCESS +case $ACTION in +up) + printf " %-9s " "$INTERFACE" + + case "$INTERFACETYPE" in + sit) + case "$BOOTPROTO" in + static|6to4) + iptunnel_add + RETVAL=$? + ;; + *) + logerror "unsupported tunnel boot protocol $BOOTPROTO" + RETVAL=$R_USAGE + ;; + esac + ;; + gre|ipip) + case "$BOOTPROTO" in + static) + iptunnel_add + RETVAL=$? + ;; + *) + logerror "unsupported tunnel boot protocol $BOOTPROTO" + RETVAL=$R_USAGE + ;; + esac + ;; + tun|tap) + # we use a persistent tunnel by default + if [ "$TUNNEL_SET_PERSISTENT" != no ] ; then + case "$INTERFACETYPE" in + tap) TUNCTL_TYPE_ARG="-p" ;; + tun) TUNCTL_TYPE_ARG="-n" ;; + esac + + tunctl=$(tunctl_bin) + if [ -z "$tunctl" ] ; then + logerror "tunctl not available -- install tunctl package" + exit $R_ERROR + fi + + $tunctl -t $INTERFACE ${TUNCTL_TYPE_ARG} \ + ${TUNNEL_SET_OWNER:+-u "$TUNNEL_SET_OWNER"} \ + ${TUNNEL_SET_GROUP:+-g "$TUNNEL_SET_GROUP"} \ + 2>&1 || exit $R_NODEV + + else + logerror "non-persistent tunnels not supported yet" + exit $R_NODEV + fi + ;; + esac +;; +down) + if is_iface_up $INTERFACE ; then + ip link set dev $INTERFACE down + fi + + case "$INTERFACETYPE" in + tun|tap) + printf " %-9s " "$INTERFACE" + + if [ -d /sys/class/net/$INTERFACE ] ; then + tunctl=$(tunctl_bin) + if [ -z "$tunctl" ] ; then + logerror "tunctl not available -- install tunctl or uml-utilities" + exit $R_ERROR + fi + + $tunctl -d $INTERFACE 2>&1 || RETVAL=$R_ERROR + fi + ;; + sit|gre|ipip) + iptunnel_del + RETVAL=$? + ;; + esac +;; +status) + if is_iface_up $INTERFACE ; then + : ip addr show $INTERFACE + else + RETVAL=$R_NOTRUNNING + fi +;; +check) + : check action not implemented for $INTERFACE +;; +esac + +exit $RETVAL diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/scripts/ifup-wireless new/sysconfig-0.71.1/scripts/ifup-wireless --- old/sysconfig-0.70.8/scripts/ifup-wireless 2008-05-20 13:08:23.000000000 +0200 +++ new/sysconfig-0.71.1/scripts/ifup-wireless 2008-07-24 09:21:33.000000000 +0200 @@ -19,7 +19,7 @@ # # Author: Joachim Gleissner <jg@suse.de>, 2005 # -# $Id: ifup-wireless 1648 2008-05-14 11:48:31Z mt $ +# $Id: ifup-wireless 1657 2008-05-19 15:11:50Z mt $ # usage () { @@ -114,7 +114,7 @@ get_network_count() { count=0 - for i in `seq 1 9` ; do + for i in {1..9} ; do W="`eval echo \\$WIRELESS_AUTH_MODE_$i`" if [ -n "`eval echo $\"$W\"`" ]; then count=$((count+1)) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/scripts/Makefile.am new/sysconfig-0.71.1/scripts/Makefile.am --- old/sysconfig-0.70.8/scripts/Makefile.am 2008-05-20 13:08:23.000000000 +0200 +++ new/sysconfig-0.71.1/scripts/Makefile.am 2008-07-24 09:21:33.000000000 +0200 @@ -1,5 +1,8 @@ ## Process this file with automake to produce Makefile.in +CLEANFILES = *~ +MAINTAINERCLEANFILES = Makefile.in + SUBDIRS = hardware sysconfig_network_scripts_SCRIPTS = functions \ @@ -16,6 +19,7 @@ ifup-services \ ifup-skel \ ifup-wireless \ + ifup-tunnel \ dhcpcd-hook \ drop-hotplug-symlink.sh \ ifplugd-selectif \ @@ -55,6 +59,8 @@ 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 + ln -sf ifup-tunnel $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifstatus-tunnel + ln -sf ifup-tunnel $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifdown-tunnel ln -sf ifup-ppp $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifdown-ppp ln -sf ifup-ppp $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifstatus-ppp ln -sf ifup-802.1q $(DESTDIR)/$(sysconfig_network_scriptsdir)/ifdown-802.1q diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/scripts/netcontrol_global_hooks new/sysconfig-0.71.1/scripts/netcontrol_global_hooks --- old/sysconfig-0.70.8/scripts/netcontrol_global_hooks 2008-05-20 13:08:23.000000000 +0200 +++ new/sysconfig-0.71.1/scripts/netcontrol_global_hooks 2008-07-24 09:21:33.000000000 +0200 @@ -40,7 +40,6 @@ shopt -s nullglob for a in if-${ACTION}.d/*; do test -x "$a" || continue - get_config_name info_mesg "calling '`pwd`/$a '${INTERFACE}' ${INTERFACE} -o nm'" $a "${INTERFACE}" ${INTERFACE} -o nm done diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/scripts/network new/sysconfig-0.71.1/scripts/network --- old/sysconfig-0.70.8/scripts/network 2008-05-22 08:42:24.000000000 +0200 +++ new/sysconfig-0.71.1/scripts/network 2008-07-24 09:21:33.000000000 +0200 @@ -21,7 +21,7 @@ # Christian Zoz <zoz@suse.de> # Mads Martin J�rgensen <mmj@suse.de> # -# $Id: network 1661 2008-05-22 06:42:23Z mt $ +# $Id: network 1670 2008-05-29 15:53:27Z mt $ # # /etc/init.d/network # @@ -49,7 +49,7 @@ rc_exit fi -# . scripts/extradebug +test "$DEBUG" = "EXTRA" && . scripts/extradebug # Only use ifup option 'onboot' if booting or changing runlevel # Therefore we check if we were called from init @@ -378,7 +378,7 @@ *ppp|dsl|modem|isdn) DIALUP_IFACES="$DIALUP_IFACES $b" ;; - ipip|sit|gre) + ipip|sit|gre|tun|tap) TUNNEL_IFACES="$TUNNEL_IFACES $b" ;; bridge) @@ -436,8 +436,9 @@ # take all configurations except these # - which seem to be backup files # - which have STARTMODE != onboot/auto - # - which are dialup or tunnel interfaces - # - which serve as slave interfaces for bonding, vlan or tunnels + # - which are virtual, dialup or tunnel interfaces + # - which serve as slave interfaces for bonding, vlan + # or tunnels, except the slave interfaces are physical while IFS=- read a b; do case "$b" in ""|*~|*.old|*.rpmnew|*.rpmsave|*.scpmbackup|lo) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/tools/Makefile.am new/sysconfig-0.71.1/tools/Makefile.am --- old/sysconfig-0.70.8/tools/Makefile.am 2008-05-20 13:08:21.000000000 +0200 +++ new/sysconfig-0.71.1/tools/Makefile.am 2008-07-24 09:21:31.000000000 +0200 @@ -1,7 +1,7 @@ # vim: ai CLEANFILES = *~ - +MAINTAINERCLEANFILES = Makefile.in sbin_PROGRAMS = ifuser \ autoip diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/sysconfig-0.70.8/VERSION new/sysconfig-0.71.1/VERSION --- old/sysconfig-0.70.8/VERSION 2008-05-20 13:08:10.000000000 +0200 +++ new/sysconfig-0.71.1/VERSION 2008-07-24 10:02:53.000000000 +0200 @@ -1 +1 @@ -0.70.8 +0.71.1 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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