[rusers] Use systemd notify messages
Honza Horak
hhorak at fedoraproject.org
Tue Sep 25 08:54:19 UTC 2012
commit be524969388fe0fe1d6254df70c1a61f3855fefe
Author: Honza HorĂ¡k <hhorak at redhat.com>
Date: Tue Sep 25 10:54:11 2012 +0200
Use systemd notify messages
rstatd.service | 3 ++-
rusers.spec | 8 ++++++--
rusersd.service | 3 ++-
3 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/rstatd.service b/rstatd.service
index 5a23714..871c6c2 100644
--- a/rstatd.service
+++ b/rstatd.service
@@ -4,7 +4,8 @@ Requires=syslog.target network.target rpcbind.service
After=rpcbind.service
[Service]
-Type=forking
+Type=notify
+NotifyAccess=all
ExecStart=/usr/sbin/rpc.rstatd
StandardError=syslog
diff --git a/rusers.spec b/rusers.spec
index 97fae91..546ce88 100644
--- a/rusers.spec
+++ b/rusers.spec
@@ -31,6 +31,7 @@ Patch14: rusers-0.17-procdiskstats.patch
Patch15: rusers-0.17-rusersd-droppriv.patch
# Oracle explicitly gave permission for this relicensing on August 18, 2010.
Patch16: rusers-0.17-new-rpc-license.patch
+Patch17: rusers-0.17-sdnotify.patch
BuildRequires: procps libselinux-devel
%description
@@ -51,6 +52,7 @@ Requires(postun): systemd-units
Requires(post): systemd-sysv
Requires: portmap
BuildRequires: systemd-units
+BuildRequires: systemd-devel
%description server
The rusers program allows users to find out who is logged into various
@@ -81,6 +83,7 @@ who is logged into your machine.
%patch14 -p1 -b .procdiskstats
%patch15 -p1 -b .dropprivs
%patch16 -p1 -b .licensefix
+%patch17 -p1 -b .sdnotify
%build
cat > MCONFIG <<EOF
@@ -99,14 +102,14 @@ INSTALLROOT=
CC=cc
CFLAGS=${RPM_OPT_FLAGS} -fPIC -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline
LDFLAGS=-pie
-LIBS=
+LIBS=-lsystemd-daemon
USE_GLIBC=1
EOF
make
%if %{WITH_SELINUX}
-make LIBS="-lselinux" -C rpc.rstatd
+make LIBS="-lselinux -lsystemd-daemon" -C rpc.rstatd
%else
make -C rpc.rstatd
%endif
@@ -187,6 +190,7 @@ install %SOURCE3 ${RPM_BUILD_ROOT}%{_unitdir}/rstatd.service
* Tue Sep 11 2012 Honza Horak <hhorak at redhat.com> - 0.17-70
- Minor spec file changes
- Use new systemd macros (Resolves: #850302)
+- Use systemd notify messages
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.17-69
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
diff --git a/rusersd.service b/rusersd.service
index fe2bef1..2d2121b 100644
--- a/rusersd.service
+++ b/rusersd.service
@@ -4,7 +4,8 @@ Requires=syslog.target network.target rpcbind.service
After=rpcbind.service
[Service]
-Type=forking
+Type=notify
+NotifyAccess=all
ExecStart=/usr/sbin/rpc.rusersd
StandardError=syslog
More information about the scm-commits
mailing list