Hello community, here is the log from the commit of package dhcp for openSUSE:Factory checked in at Fri Mar 12 17:16:15 CET 2010. -------- --- dhcp/dhcp.changes 2010-01-07 20:41:30.000000000 +0100 +++ /mounts/work_src_done/STABLE/dhcp/dhcp.changes 2010-03-12 16:57:52.000000000 +0100 @@ -1,0 +2,6 @@ +Fri Mar 12 15:53:09 UTC 2010 - mt@suse.de + +- Fixed dhclient-script to call ifup -o dhcp and signal "complete" + to ifup when all configuration is done (bnc#585380,bnc#518219). + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- dhcp-3.1.3-dhclient-script.bnc585380.dif ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dhcp.spec ++++++ --- /var/tmp/diff_new_pack.H40TTW/_old 2010-03-12 17:16:01.000000000 +0100 +++ /var/tmp/diff_new_pack.H40TTW/_new 2010-03-12 17:16:01.000000000 +0100 @@ -31,7 +31,7 @@ Group: Productivity/Networking/Boot/Servers AutoReqProv: on Version: 3.1.3 -Release: 2 +Release: 3 Summary: Common Files Used by ISC DHCP Software Url: http://www.isc.org/isc/dhcp.html Source0: dhcp-%{version}.tar.bz2 @@ -81,6 +81,7 @@ Patch51: dhcp-3.1.3-dhclient-conf.bnc516459.dif Patch60: dhcp-3.1.3-dhclient-script.dif Patch61: dhcp-3.1.3-dhclient-script.bnc555095.dif +Patch62: dhcp-3.1.3-dhclient-script.bnc585380.dif ## Obsoletes: dhcp-base Provides: dhcp-base:/usr/bin/omshell @@ -208,6 +209,7 @@ %patch51 -p0 %patch60 -p0 %patch61 -p0 +%patch62 -p0 ## find . -type f -name \*.cat\* -exec rm -f {} \; cp -p %{S:2} %{S:3} %{S:11} %{S:12} %{S:14} %{S:32} %{S:33} . ++++++ dhcp-3.1.3-dhclient-script.bnc585380.dif ++++++ --- client/scripts/linux +++ client/scripts/linux 2010/03/04 13:30:09 @@ -29,8 +29,7 @@ # if DHCLIENT_DEBUG is set in sysconfig/network/dhcp # SYSCONFIG_CFG_DIR="/etc/sysconfig/network" -SYSCONFIG_RUN_DIR=`. "$SYSCONFIG_CFG_DIR/scripts/functions" \ - 2>/dev/null && echo "$RUN_FILES_BASE"` +. "$SYSCONFIG_CFG_DIR/scripts/functions" SYSCONFIG_RUN_DIR=${SYSCONFIG_RUN_DIR:-/dev/.sysconfig/network} eval `grep "^DHCLIENT_DEBUG=" "$SYSCONFIG_CFG_DIR/dhcp" 2>/dev/null` if [ "$DHCLIENT_DEBUG" = yes ]; then @@ -40,7 +39,7 @@ if [ "$DHCLIENT_DEBUG" = yes ]; then echo "$0 $*" date echo '----------------' - set + env echo '----------------' ) >> /var/log/dhclient-script.log exec 2>> /var/log/dhclient-script.log @@ -48,6 +47,10 @@ if [ "$DHCLIENT_DEBUG" = yes ]; then set -x fi +is_ifup_controlled() +{ + test -f "$SYSCONFIG_RUN_DIR/if-${interface}" +} # netconfig makes all "additional" modifications as DNS or NTP use_netconfig() { test -x /sbin/netconfig @@ -94,9 +97,7 @@ netconfig_remove() { } set_default_gw_route() { - if test -f "$SYSCONFIG_CFG_DIR/ifcfg-${interface}" -o \ - -f "$SYSCONFIG_RUN_DIR/if-${interface}" ; - then + if is_ifup_controlled ; then if grep -qs '^primary=yes' "$SYSCONFIG_RUN_DIR/if-${interface}" 2>/dev/null ; then eval `grep --no-filename '^[[:space:]]*DHCLIENT_SET_DEFAULT_ROUTE=' \ @@ -134,9 +135,7 @@ set_default_gw_route() } set_hostname() { - if test -f "$SYSCONFIG_CFG_DIR/ifcfg-${interface}" -o \ - -f "$SYSCONFIG_RUN_DIR/if-${interface}" ; - then + if is_ifup_controlled ; then if grep -qs '^primary=yes' "$SYSCONFIG_RUN_DIR/if-${interface}" 2>/dev/null ; then eval `grep --no-filename "^[[:space:]]*DHCLIENT_SET_HOSTNAME=" \ @@ -157,13 +156,14 @@ set_hostname() [ "x${current_hostname%%.*}" = "xlocalhost" ] || \ [ "x${current_hostname%%.*}" != "x${new_host_name%%.*}" ]; then - if [ "x${new_host_name%%.*}" != x ]; then + if [ "x${new_host_name%%.*}" != "x" ]; then hostname "${new_host_name%%.*}" else if [ -x /usr/bin/host ] ; then if out=`host -W 2 "$new_ip_address" 2>/dev/null` ; then _hostname="`echo "$out" | sed 's:^.* ::; s:\..*::'`" - if [ "x${_hostname}" != x ]; then + if [ "x${_hostname}" != "x" -a \ + "x${_hostname}" != "x${current_hostname%%.*}" ]; then hostname "${_hostname}" fi fi @@ -171,6 +171,20 @@ set_hostname() fi fi fi + if is_ifup_controlled ; then + # check regardless the DHCLIENT_SET_HOSTNAME setting + # and whether we've set it above or not, because when + # it changed, we've to handle it anyway... + local OLD_HOSTNAME=`read_cached_config_data hostname $interface` + local 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 + + # reload syslog so it knows the new hostname + /etc/init.d/syslog reload + fi + fi } resolv_conf_dhclient="/var/lib/dhcp/resolv.conf.dhclient.$interface" @@ -300,7 +314,15 @@ if [ x$reason = xBOUND ] || [ x$reason = # and clear the ARP cache. ifconfig $interface inet 0 + if is_ifup_controlled ; then + write_cached_config_data dhcp4_state "new" $interface + commit_cached_config_data $interface + fi + elif is_ifup_controlled ; then + write_cached_config_data dhcp4_state "up" $interface + commit_cached_config_data $interface fi + if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then @@ -328,7 +350,20 @@ if [ x$reason = xBOUND ] || [ x$reason = make_resolv_conf fi + if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then + if is_ifup_controlled ; then + ifdown $interface -o dhcp + fi + fi + set_hostname + if is_ifup_controlled ; then + # execute ifservice and if-up.d scripts + ifup $interface -o dhcp + + write_cached_config_data dhcp4_state "complete" $interface + commit_cached_config_data $interface + fi exit_with_hooks 0 fi @@ -376,12 +411,26 @@ if [ x$reason = xTIMEOUT ]; then make_resolv_conf fi + set_hostname + if is_ifup_controlled ; then + # execute ifservice and if-up.d scripts + ifup $interface -o dhcp + + write_cached_config_data dhcp4_state "complete" $interface + commit_cached_config_data $interface + fi + exit_with_hooks 0 fi ifconfig $interface inet 0 exit_with_hooks 1 fi +if is_ifup_controlled ; then + write_cached_config_data dhcp4_state "down" $interface + commit_cached_config_data $interface +fi + if use_netconfig ; then netconfig_remove else ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org