[ypbind] Changed -n option for staying in foreground to not overlap with config-file option

Jan Horak hhorak at fedoraproject.org
Mon Jun 13 11:06:21 UTC 2011


commit b2e5f2c05bee9c3ea211c2114d51f6b5fb11d82a
Author: Honza Horák <hhorak at redhat.com>
Date:   Mon Jun 13 13:05:54 2011 +0200

    Changed -n option for staying in foreground to not overlap
    with config-file option

 ...2-systemd.patch => ypbind-mt-1.33-systemd.patch |   29 +++++++++++++-------
 ypbind.service                                     |    2 +-
 ypbind.spec                                        |    8 ++++-
 3 files changed, 26 insertions(+), 13 deletions(-)
---
diff --git a/ypbind-mt-1.32-systemd.patch b/ypbind-mt-1.33-systemd.patch
similarity index 62%
rename from ypbind-mt-1.32-systemd.patch
rename to ypbind-mt-1.33-systemd.patch
index 7c87b9a..31d75fb 100644
--- a/ypbind-mt-1.32-systemd.patch
+++ b/ypbind-mt-1.33-systemd.patch
@@ -1,6 +1,6 @@
-diff -up ypbind-mt-1.32/man/ypbind.8.systemd ypbind-mt-1.32/man/ypbind.8
---- ypbind-mt-1.32/man/ypbind.8.systemd	2011-04-14 14:28:24.558085630 +0200
-+++ ypbind-mt-1.32/man/ypbind.8	2011-04-14 14:28:24.596085630 +0200
+diff -up ypbind-mt-1.33/man/ypbind.8.systemd ypbind-mt-1.33/man/ypbind.8
+--- ypbind-mt-1.33/man/ypbind.8.systemd	2011-06-13 12:44:54.420376848 +0200
++++ ypbind-mt-1.33/man/ypbind.8	2011-06-13 12:57:19.777377125 +0200
 @@ -171,7 +171,7 @@ ypbind \- NIS binding process
  .SH "Synopsis"
  .fam C
@@ -14,7 +14,7 @@ diff -up ypbind-mt-1.32/man/ypbind.8.systemd ypbind-mt-1.32/man/ypbind.8
  will not put itself into background, and error messages and debug output are written to standard error\&.
  .RE
  .PP
-+\fB\-foreground\fR
++\fB\-n, \-foreground\fR
 +.RS 4
 +\fBypbind\fR
 +will not put itself into background\&.
@@ -35,9 +35,9 @@ diff -up ypbind-mt-1.32/man/ypbind.8.systemd ypbind-mt-1.32/man/ypbind.8
  .SH "SEE ALSO"
  .PP
  
-diff -up ypbind-mt-1.32/src/ypbind-mt.c.systemd ypbind-mt-1.32/src/ypbind-mt.c
---- ypbind-mt-1.32/src/ypbind-mt.c.systemd	2009-11-19 11:29:00.000000000 +0100
-+++ ypbind-mt-1.32/src/ypbind-mt.c	2011-04-14 14:28:24.598085629 +0200
+diff -up ypbind-mt-1.33/src/ypbind-mt.c.systemd ypbind-mt-1.33/src/ypbind-mt.c
+--- ypbind-mt-1.33/src/ypbind-mt.c.systemd	2011-04-29 16:33:11.000000000 +0200
++++ ypbind-mt-1.33/src/ypbind-mt.c	2011-06-13 12:55:10.185377077 +0200
 @@ -71,6 +71,7 @@ const char *configfile = "/etc/yp.conf";
  int ypset = SET_NO;
  int use_broadcast = 0;
@@ -46,17 +46,26 @@ diff -up ypbind-mt-1.32/src/ypbind-mt.c.systemd ypbind-mt-1.32/src/ypbind-mt.c
  int ping_interval = 20;
  int local_only = 0;
  int port = -1;
-@@ -688,6 +689,9 @@ main (int argc, char **argv)
+@@ -506,7 +507,7 @@ usage (int ret)
+     output = stdout;
+ 
+   fputs (_("Usage:\n"), output);
+-  fputs (_("\typbind [-broadcast | -ypset | -ypsetme] [-f configfile]\n\t  [-no-ping] [-broken-server] [-local-only] [-i ping-interval] [-debug] [-verbose]\n"), output);
++  fputs (_("\typbind [-broadcast | -ypset | -ypsetme] [-f configfile]\n\t  [-no-ping] [-broken-server] [-local-only] [-i ping-interval] [-debug]\n\t  [-verbose] [-n | -foreground]\n"), output);
+ #ifdef USE_DBUS_NM
+   fputs (_("\t  [-no-dbus]\n"), output);
+ #endif
+@@ -691,6 +692,9 @@ main (int argc, char **argv)
        else if (strcmp ("-d", argv[i]) == 0 ||
  	       strcmp ("-debug", argv[i]) == 0)
          debug_flag = 1;
-+      else if (strcmp ("-f", argv[i]) == 0 ||
++      else if (strcmp ("-n", argv[i]) == 0 ||
 +	       strcmp ("-foreground", argv[i]) == 0)
 +        foreground_flag = 1;
        else if (strcmp ("-v", argv[i]) == 0 ||
  	       strcmp ("-verbose", argv[i]) == 0)
          verbose_flag = 1;
-@@ -830,7 +834,7 @@ main (int argc, char **argv)
+@@ -833,7 +837,7 @@ main (int argc, char **argv)
        log_msg (LOG_DEBUG, "[Welcome to ypbind-mt, version %s]\n", VERSION);
        log_msg (LOG_DEBUG, "ping interval is %d seconds\n", ping_interval);
      }
diff --git a/ypbind.service b/ypbind.service
index 1cb8a00..171a701 100644
--- a/ypbind.service
+++ b/ypbind.service
@@ -7,7 +7,7 @@ EnvironmentFile=-/etc/sysconfig/network
 EnvironmentFile=-/etc/sysconfig/ypbind
 ExecStartPre=-/usr/lib/ypbind/ypbind-pre-setdomain
 ExecStartPre=-/usr/sbin/setsebool allow_ypbind=1 
-ExecStart=/usr/sbin/ypbind -f $OTHER_YPBIND_OPTS
+ExecStart=/usr/sbin/ypbind -n $OTHER_YPBIND_OPTS
 ExecStopPost=/usr/sbin/setsebool allow_ypbind=0 ; /usr/lib/ypbind/ypbind-post-waitbind
 
 [Install]
diff --git a/ypbind.spec b/ypbind.spec
index 802588d..4d19ec4 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.33
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPLv2
 Group: System Environment/Daemons
 Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2
@@ -18,7 +18,7 @@ Patch1: ypbind-1.11-gettextdomain.patch
 Patch2: ypbind-mt-1.32-typo.patch
 Patch3: ypbind-mt-1.32-typo2.patch
 Patch4: ypbind-mt-1.32-dbus.patch
-Patch5: ypbind-mt-1.32-systemd.patch
+Patch5: ypbind-mt-1.33-systemd.patch
 # This is for /bin/systemctl
 Requires(post): systemd-units
 Requires(preun): systemd-units
@@ -107,6 +107,10 @@ fi
 %doc README NEWS COPYING
 
 %changelog
+* Mon Jun 13 2011 Honza Horak <hhorak at redhat.com> - 3:1.33-4
+- Changed -n option for staying in foreground to not overlap 
+  with config-file option
+
 * Tue Jun 07 2011 Honza Horak <hhorak at redhat.com> - 3:1.33-3
 - Fixed ypbind.service when selinux is disabled
 


More information about the scm-commits mailing list