diff --git a/ypbind-mt-1.20.4-nm.patch b/ypbind-mt-1.20.4-nm.patch new file mode 100644 index 0000000..a55054a --- /dev/null +++ b/ypbind-mt-1.20.4-nm.patch @@ -0,0 +1,44 @@ +diff -up ypbind-mt-1.20.4/src/ypbind_dbus_nm.c.nm ypbind-mt-1.20.4/src/ypbind_dbus_nm.c +--- ypbind-mt-1.20.4/src/ypbind_dbus_nm.c.nm 2007-02-14 14:01:57.000000000 +0100 ++++ ypbind-mt-1.20.4/src/ypbind_dbus_nm.c 2009-01-26 16:05:58.000000000 +0100 +@@ -320,13 +320,13 @@ dbus_init (void) + if (check_online (connection) == 1) + { + if (debug_flag) +- log_msg (LOG_DEBUG, "Are already online"); +- is_online = 1; ++ log_msg (LOG_DEBUG, "Network is available now"); ++ go_online(); + } + else + { + if (debug_flag) +- log_msg (LOG_DEBUG, "Are offline"); ++ log_msg (LOG_DEBUG, "No network is available now"); + is_online = 0; + } + return 1; +diff -up ypbind-mt-1.20.4/src/ypbind-mt.c.nm ypbind-mt-1.20.4/src/ypbind-mt.c +--- ypbind-mt-1.20.4/src/ypbind-mt.c.nm 2009-01-26 16:05:58.000000000 +0100 ++++ ypbind-mt-1.20.4/src/ypbind-mt.c 2009-01-26 16:05:58.000000000 +0100 +@@ -765,9 +765,17 @@ main (int argc, char **argv) + BINDINGDIR, strerror (errno)); + exit (1); + } +- +- if (!use_broadcast && (load_config (0) != 0)) +- use_broadcast = 1; ++ /* ++ * Load config if we're not using DBUS/NetworkManager, since we ++ * assume the network is available now. If we're using NetworkManager, ++ * the config will be loaded when a network becomes available. ++ */ ++ if (disable_dbus) ++ { ++ /* Load the configuration. If the load fails, set up broadcast mode. */ ++ if (!use_broadcast && (load_config (0) != 0)) ++ use_broadcast = 1; ++ } + if (use_broadcast) + add_server (domain, NULL, 0); + diff --git a/ypbind.spec b/ypbind.spec index 026f040..f0248f2 100644 --- a/ypbind.spec +++ b/ypbind.spec @@ -1,7 +1,7 @@ Summary: The NIS daemon which binds NIS clients to an NIS domain Name: ypbind Version: 1.20.4 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv2 Group: System Environment/Daemons Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2 @@ -14,6 +14,7 @@ Patch3: ypbind-mt-1.19-port-leak.patch Patch4: ypbind-mt-1.20.4-log-binds.patch Patch5: ypbind-mt-1.20.4-smartwrite.patch Patch6: ypbind-mt-1.20.4-man-port.patch +Patch7: ypbind-mt-1.20.4-nm.patch Requires(post): chkconfig Requires(preun): chkconfig @@ -51,6 +52,7 @@ also need to install the ypserv package to a machine on your network. %patch4 -p1 -b .log-binds %patch5 -p1 -b .smartwrite %patch6 -p1 -b .man-port +%patch7 -p1 -b .nm %build %configure --sbindir=/sbin @@ -95,6 +97,10 @@ fi %doc README NEWS %changelog +* Mon Jan 26 2009 Vitezslav Crhonek - 3:1.20.4-13 +- Fix ypbind can fail to bind if started soon after NetworkManager + Resolves: #480096 + * Mon Jan 5 2009 Vitezslav Crhonek - 3:1.20.4-12 - Ship helper script for dhclient