Changed -n option for staying in foreground to not overlap

with config-file option
This commit is contained in:
Honza Horák 2011-06-13 13:05:54 +02:00
parent c6bbe81b0f
commit b2e5f2c05b
3 changed files with 26 additions and 13 deletions

View File

@ -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);
}

View File

@ -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]

View File

@ -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@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@redhat.com> - 3:1.33-3
- Fixed ypbind.service when selinux is disabled