[inn] Rewrite systemd.service file Allow login to news user account

Jochen Schmitt s4504kr at fedoraproject.org
Thu Sep 1 13:19:55 UTC 2011


commit e05e3b063d71aea470e0e9b3de9aff5642b11799
Author: Jochen Schmitt <Jochen at herr-schmitt.de>
Date:   Thu Sep 1 15:18:45 2011 +0200

    Rewrite systemd.service file
    Allow login to news user account

 inn.spec     |   18 ++++++------------
 innd.service |    6 +++---
 prepare-innd |    4 ----
 start-innd   |    9 ---------
 stop-innd    |   10 ----------
 5 files changed, 9 insertions(+), 38 deletions(-)
---
diff --git a/inn.spec b/inn.spec
index 10b4100..f060120 100644
--- a/inn.spec
+++ b/inn.spec
@@ -1,7 +1,7 @@
 Summary: The InterNetNews system, an Usenet news server
 Name: inn
 Version: 2.5.2
-Release: 13%{?dist}
+Release: 14%{?dist}
 #see LICENSE file for details
 License: GPLv2+ and BSD and MIT and Public Domain
 Group: System Environment/Daemons
@@ -13,9 +13,6 @@ Source5: inn-cron-rnews
 Source7: inn-cron-nntpsend
 Source10: inn-faq.tar.gz
 Source20: innd.service
-Source21: prepare-innd
-Source22: start-innd
-Source23: stop-innd
 Patch1:  inn-2.4.3.rh.patch
 Patch4: inn-2.5.1.pie.patch
 Patch6: inn-2.5.2.posix.patch
@@ -94,7 +91,7 @@ This package contains dynamic libraries provided by INN project
 %pre
 getent group news >/dev/null || groupadd -g 13 -r news
 getent passwd news >/dev/null || \
-useradd -r -u 9 -g news -d /etc/news -s /sbin/nologin \
+useradd -r -u 9 -g news -d /etc/news  \
 -c "News server user" news
 exit 0
 
@@ -178,10 +175,6 @@ install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/inn-cron-nntpsend
 mkdir -p $RPM_BUILD_ROOT%{_unitdir}
 install -p -m 0644 %{SOURCE20} $RPM_BUILD_ROOT%{_unitdir}
 
-install -p -m 0644 %{SOURCE21} $RPM_BUILD_ROOT/lib/systemd/
-install -p -m 0644 %{SOURCE22} $RPM_BUILD_ROOT/lib/systemd/
-install -p -m 0644 %{SOURCE23} $RPM_BUILD_ROOT/lib/systemd/
-
 
 tar xf %{SOURCE10}
 mv inn.html FAQ.html
@@ -304,9 +297,6 @@ fi
 %{_sysconfdir}/cron.hourly/inn-cron-nntpsend
 %{_sysconfdir}/cron.daily/inn-cron-expire
 %{_unitdir}/innd.service
-/lib/systemd/prepare-innd
-/lib/systemd/start-innd
-/lib/systemd/stop-innd
 %defattr(-,news,news,-)
 # /etc/news config files
 %dir %{_sysconfdir}/news
@@ -528,6 +518,10 @@ fi
 %{_mandir}/man1/inews*
 
 %changelog
+* Thu Sep  1 2011 Jochen Schmitt <Jochen herr-schmitt de> - 2.5.2-14
+- Rewrite systemd.service file
+- Allow login to news user account
+
 * Thu Jul 21 2011 Petr Sabata <contyk at redhat.com> - 2.5.2-13
 - Perl mass rebuild
 
diff --git a/innd.service b/innd.service
index 41341f7..8a4ed9d 100644
--- a/innd.service
+++ b/innd.service
@@ -6,9 +6,9 @@ ConditionPathExists=/etc/news/inn.conf
 [Service]
 PIDFile=/run/news/innd.pid
 Type=forking
-ExecStartPre=/lib/systemd/prepare-innd
-ExecStart=/lib/systemd/start-innd
-ExecStop=/lib/systemd/stop-innd
+ExecStartPre=/bin/mkdir -p /run/news ; /bin/chown -f news:news /run/news
+ExecStart=/bin/su -m  news -c /usr/libexec/news/rc.news
+ExecStop=/bin/su -m  news -c '/usr/libexec/news/rc.news stop'
 KillMode=control-group
 
 [Install]


More information about the scm-commits mailing list