Mailinglist Archive: opensuse-commit (794 mails)
| < Previous | Next > |
commit sysconfig for openSUSE:Factory
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Thu, 10 Sep 2009 12:47:39 +0200
- Message-id: <20090910104739.3EAB4637D@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package sysconfig for openSUSE:Factory
checked in at Thu Sep 10 12:47:39 CEST 2009.
--------
--- sysconfig/sysconfig.changes 2009-08-13 13:45:11.000000000 +0200
+++ /mounts/work_src_done/STABLE/sysconfig/sysconfig.changes 2009-09-09
13:09:26.000000000 +0200
@@ -1,0 +2,20 @@
+Wed Sep 9 13:07:36 CEST 2009 - mt@xxxxxxx
+
+- Implemented support to set the wireless regulatory domain using
+ WIRELESS_REGULATORY_DOMAIN network/config variable (fate#305301).
+
+-------------------------------------------------------------------
+Thu Sep 3 12:34:35 CEST 2009 - mt@xxxxxxx
+
+- Added check for hostname changes to avoid a syslog reload in
+ dhcpcd-hook when it didn't changed (fate#305702,bnc#466198).
+- Fixed waiting for successful connection in NetworkManager in
+ the /etc/init.d/network script by removing nm-online's --exit
+ option, that caused to exit immediately instead of waiting up
+ to NM_ONLINE_TIMEOUT seconds, because the NetworkManager has
+ been started just now and not ready yet (bnc#515629).
+- Added additional dhcp client specific start options variables
+ DHCPCD-, DHCLIENT- and DHCP6C_USER_OPTIONS, enabling the user
+ to set custom options in special cases (bnc#524695).
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
New:
----
sysconfig-allow-per-dhcp-client-user-options.bnc524695.diff
sysconfig-dhcp-avoid-syslog-reload.fate305702.diff
sysconfig-nm-online-no-exit.bnc515629.diff
sysconfig-wireless-regulatory-domain.fate305301.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ sysconfig.spec ++++++
--- /var/tmp/diff_new_pack.IHYQww/_old 2009-09-10 12:46:59.000000000 +0200
+++ /var/tmp/diff_new_pack.IHYQww/_new 2009-09-10 12:46:59.000000000 +0200
@@ -20,7 +20,7 @@
Name: sysconfig
Version: 0.72.3
-Release: 1
+Release: 2
Summary: The sysconfig scheme
Group: System/Base
License: GPL v2 or later
@@ -29,6 +29,10 @@
Requires: iproute2 dbus-1 hal procps
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: %name-%version.tar.bz2
+Patch1: sysconfig-nm-online-no-exit.bnc515629.diff
+Patch2: sysconfig-allow-per-dhcp-client-user-options.bnc524695.diff
+Patch3: sysconfig-dhcp-avoid-syslog-reload.fate305702.diff
+Patch4: sysconfig-wireless-regulatory-domain.fate305301.diff
%description
This package provides the SuSE system configuration scheme.
@@ -49,6 +53,10 @@
%prep
%setup -n sysconfig-%{version}
+%patch1 -p0
+%patch2 -p0
+%patch3 -p0
+%patch4 -p0
%build
autoreconf --force --install
@@ -215,10 +223,8 @@
#
%{fillup_and_insserv -fY network}
%{fillup_and_insserv -fY network-remotefs}
-if test -f etc/sysconfig/network/dhcp ; then
- # remove first, we need the new default value
- sysconfig_remove_and_set network/dhcp DHCLIENT_TIMEOUT
-fi
+# remove first, we need the new default value
+sysconfig_remove_and_set network/dhcp DHCLIENT_TIMEOUT
%{fillup_only -dns dhcp network network}
%{fillup_only -dns config network network}
/sbin/ldconfig
++++++ sysconfig-allow-per-dhcp-client-user-options.bnc524695.diff ++++++
--- config/sysconfig.dhcp-network
+++ config/sysconfig.dhcp-network 2009-09-01 12:27:38.000000000 +0200
@@ -32,6 +32,33 @@
#
DHCLIENT6_BIN=""
+## Type: string
+## Default: ""
+## ServiceRestart: network
+#
+# Additional user start options to use when the 'dhcpcd' DHCPv4 client
+# is enabled in the DHCLIENT_BIN variable (default).
+#
+DHCPCD_USER_OPTIONS=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: network
+#
+# Additional user start options to use when the 'dhclient' ISC DHCPv4
+# client is enabled in the DHCLIENT_BIN variable.
+#
+DHCLIENT_USER_OPTIONS=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: network
+#
+# Additional user start options to use when the 'dhcp6c' DHCPv6 client
+# is enabled in the DHCLIENT6_BIN variable (default).
+#
+DHCP6C_USER_OPTIONS=""
+
## Type: yesno
## Default: no
#
--- scripts/ifup-dhcp
+++ scripts/ifup-dhcp 2009-09-01 12:24:45.000000000 +0200
@@ -311,10 +311,10 @@
args="$args${DHCLIENT_VENDOR_CLASS_ID:+ -i
\"$DHCLIENT_VENDOR_CLASS_ID\"}"
args="$args${DHCLIENT_LEASE_TIME:+ -l \"$DHCLIENT_LEASE_TIME\"}"
args="$args${DHCLIENT_HOSTNAME_OPTION:+ -h
\"$DHCLIENT_HOSTNAME_OPTION\"}"
- debug "Starting dhcp client: $DHCLIENT_BIN $args $INTERFACE"
+ debug "Starting dhcp client: $DHCLIENT_BIN $DHCPCD_USER_OPTIONS $args
$INTERFACE"
# now start dhcpcd
- $DHCLIENT_BIN $DHCLIENT_ARGS \
+ $DHCLIENT_BIN $DHCPCD_USER_OPTIONS $DHCLIENT_ARGS \
${DHCLIENT_TIMEOUT:+-t "$DHCLIENT_TIMEOUT"} \
${DHCLIENT_CLIENT_ID:+-I "$DHCLIENT_CLIENT_ID"} \
${DHCLIENT_VENDOR_CLASS_ID:+-i "$DHCLIENT_VENDOR_CLASS_ID"} \
@@ -354,8 +354,8 @@
{ print $0; }
' < /etc/dhclient.conf > "$DHCPIFCONF" || return 1
- debug "Starting dhcp client: $DHCLIENT_BIN -cf "$DHCPIFCONF" -lf
"$DHCPIFLEASE" -pf "$DHCPIFPID" $args $INTERFACE"
- $DHCLIENT_BIN -cf "$DHCPIFCONF" -lf "$DHCPIFLEASE" -pf "$DHCPIFPID"
$args $INTERFACE </dev/null &>/dev/null &
+ debug "Starting dhcp client: $DHCLIENT_BIN $DHCLIENT_USER_OPTIONS -cf
"$DHCPIFCONF" -lf "$DHCPIFLEASE" -pf "$DHCPIFPID" $args $INTERFACE"
+ $DHCLIENT_BIN $DHCLIENT_USER_OPTIONS -cf "$DHCPIFCONF" -lf
"$DHCPIFLEASE" -pf "$DHCPIFPID" $args $INTERFACE </dev/null &>/dev/null &
}
start_dhcp6_dhcp6c() {
@@ -380,8 +380,8 @@
echo "};"
} > "$DHCP6IFCONF" || return 1
- debug "Starting dhcp client: $DHCLIENT6_BIN $args $INTERFACE"
- $DHCLIENT6_BIN $args $INTERFACE </dev/null &>/dev/null &
+ debug "Starting dhcp client: $DHCLIENT6_BIN $DHCP6C_USER_OPTIONS $args
$INTERFACE"
+ $DHCLIENT6_BIN $DHCP6C_USER_OPTIONS $args $INTERFACE </dev/null
&>/dev/null &
}
case "$ACTION" in
++++++ sysconfig-dhcp-avoid-syslog-reload.fate305702.diff ++++++
--- scripts/dhcpcd-hook
+++ scripts/dhcpcd-hook 2009/09/03 09:17:30
@@ -71,6 +71,9 @@ state="$2"
debug="$3"
action=""
+if [ -r /etc/sysconfig/network/scripts/functions ] ; then
+ . /etc/sysconfig/network/scripts/functions
+fi
if [ -r /etc/sysconfig/network/config ] ; then
. /etc/sysconfig/network/config
fi
@@ -110,6 +113,23 @@ while read line; do
esac
done < $leaseinfo
+hostname_changed()
+{
+ # check regardless the DHCLIENT_SET_HOSTNAME setting,
+ # because if it changed, we've to handle it anyway...
+
+ # read the previous hostname from state file, when it
+ # differs with current one, update the state and report.
+ OLD_HOSTNAME=`read_cached_config_data hostname $INTERFACE`
+ CUR_HOSTNAME=`hostname 2>/dev/null`
+ if test "x$OLD_HOSTNAME" != "x$CUR_HOSTNAME" ; then
+ write_cached_config_data hostname "$CUR_HOSTNAME" $INTERFACE
+ commit_cached_config_data $INTERFACE
+ return 0
+ else
+ return 1
+ fi
+}
case $state in
up)
@@ -121,8 +141,10 @@ up)
-i $INTERFACE $NC_OPTIONS \
-l $leaseinfo 2>&1 | $log_dbg
- # reload syslog so it knows the new hostname
- /etc/init.d/syslog reload
+ if hostname_changed ; then
+ # reload syslog so it knows the new hostname
+ /etc/init.d/syslog reload
+ fi
;;
down)
# We now call PRE_DOWN_SCRIPT directly from ifdown, because it was
called
@@ -143,8 +165,10 @@ new)
-i $INTERFACE $NC_OPTIONS \
< $leaseinfo 2>&1 | $log_dbg
- # reload syslog so it knows the new hostname
- /etc/init.d/syslog reload
+ 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
--- scripts/ifup-dhcp
+++ scripts/ifup-dhcp 2009/09/03 09:16:35
@@ -553,6 +553,10 @@ case "$ACTION" in
test -f ./ifcfg-$CONFIG && . ./ifcfg-$CONFIG
fi
+ # remember the hostname to handle a change later
+ write_cached_config_data hostname "`hostname
2>/dev/null`" $INTERFACE
+ commit_cached_config_data $INTERFACE
+
debug "Activating interface $INTERFACE"
if ! is_iface_up $INTERFACE ; then
ip link set $INTERFACE up ${MTU:+mtu $MTU} \
++++++ sysconfig-nm-online-no-exit.bnc515629.diff ++++++
We should wait for connection, not exit immediatelly if connection is not
existing.
===================================================================
--- scripts/network
+++ scripts/network
@@ -153,7 +153,7 @@ start_nm_online() {
return 0
fi
local rc_startmode="${stat}${attn}waiting${norm}"
- $NM_ONLINE_BIN --exit --timeout $NM_ONLINE_TIMEOUT
+ $NM_ONLINE_BIN --timeout $NM_ONLINE_TIMEOUT
case $? in
0) rc_status -v ;;
1) echo -e "$rc_startmode" 1>&2 ;;
++++++ sysconfig-wireless-regulatory-domain.fate305301.diff ++++++
--- config/sysconfig.config-network
+++ config/sysconfig.config-network 2009/09/09 10:13:25
@@ -297,3 +297,12 @@ NETCONFIG_NIS_STATIC_DOMAIN=""
#
NETCONFIG_NIS_STATIC_SERVERS=""
+## Type: string
+## Default: ''
+#
+# Set this variable to the ISO / IEC 3166 alpha2 country code
+# specifying the wireless regulatory domain to set.
+# When not-empty, it will be set in the wpa_supplicant config
+# or via 'iw reg set' command.
+WIRELESS_REGULATORY_DOMAIN=''
+
--- scripts/ifup-wireless
+++ scripts/ifup-wireless 2009/09/09 10:52:26
@@ -182,7 +182,7 @@ info_mesg "prefer wpa_supplicant: $PREFE
######################################################################
# check for needed tools
#
-for i in iwconfig hexdump sed awk ; do
+for i in iwconfig hexdump sed awk iw ; do
if [ -z "`type -p $i`" ] ; then
err_mesg "cannot find '$i', please install"
exit $R_ERROR
@@ -443,6 +443,16 @@ old_setup()
info_mesg "WIRELESS_MODE is unset, using Managed"
WIRELESS_MODE="Managed"
fi
+
+ # Set the wireless regulatory domain country code when configured
+ if [ "x$WIRELESS_REGULATORY_DOMAIN" != x ] ; then
+ CMD="iw reg set $WIRELESS_REGULATORY_DOMAIN"
+ OUT=`$CMD 2>&1` ; RET=$?
+ if [ "$RET" -ne "0" -o "x$OUT" != x ] ; then
+ err_mesg "command '$CMD' returned\n $OUT"
+ fi
+ fi
+
# some drivers seem to have extensions like wlan-ng,
# although they do not
case "$DRIVER" in
@@ -600,6 +610,7 @@ print_wpa_conf()
# header
echo "ctrl_interface=/var/run/wpa_supplicant"
test -n "$WIRELESS_AP_SCANMODE" && echo "ap_scan=$WIRELESS_AP_SCANMODE"
+ test -n "$WIRELESS_REGULATORY_DOMAIN" && echo
"country=$WIRELESS_REGULATORY_DOMAIN"
get_first_index
local index=$?
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |