public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Ondrej Dvoracek <odvorace@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/inn] epel10.3: initscript review
Date: Wed, 26 Aug 2026 08:53:41 GMT [thread overview]
Message-ID: <178773442184.1.11869662902932787887.rpms-inn-8d210b9d6040@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/inn
Branch : epel10.3
Commit : 8d210b9d6040735f14da44a3f4b5a4fb671ccdb9
Author : Ondrej Dvoracek <odvorace@fedoraproject.org>
Date : 2007-10-01T11:11:28+00:00
Stats : +94/-81 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/inn/c/8d210b9d6040735f14da44a3f4b5a4fb671ccdb9?branch=epel10.3
Log:
initscript review
---
diff --git a/inn.spec b/inn.spec
index e4349a2..0d1bb70 100644
--- a/inn.spec
+++ b/inn.spec
@@ -1,7 +1,7 @@
-Summary: The InterNetNews (INN) system, an Usenet news server.
+Summary: The InterNetNews (INN) system, an Usenet news server
Name: inn
Version: 2.4.3
-Release: 6%{?dist}
+Release: 7%{?dist}
License: GPL
Group: System Environment/Daemons
Source0: ftp://ftp.isc.org/isc/inn/inn-%{version}.tar.gz
@@ -291,6 +291,9 @@ exit 0
%{_mandir}/man1/inews*
%changelog
+* Mon Oct 01 2006 Ondrej Dvoracek <odvorace@redhat.com> 2.4.3-7
+- initscript review (#246951)
+
* Tue Aug 29 2006 Martin Stransky <stransky@redhat.com> 2.4.3-6
- added dist tag
- added patch from #204371 - innd.init script should use
diff --git a/innd.init b/innd.init
index 0d8bcd6..2036497 100644
--- a/innd.init
+++ b/innd.init
@@ -10,115 +10,125 @@
# processname: innd
# pidfile: /var/run/news/innd.pid
+### BEGIN INIT INFO
+# Provides: innd
+# Required-Start: $network
+# Short-Description: InterNet News System
+# Description: inn is the most popular server for Usenet news. It allows \
+# you to setup local news servers. It can be difficult to \
+# set up properly though, so be sure to read /usr/share/doc/inn* \
+# before trying.
+### END INIT INFO
+
# Source function library.
. /etc/init.d/functions
# Get config.
. /etc/sysconfig/network
-# Check that networking is up.
-[ "${NETWORKING}" = "no" ] && exit 0
-[ -d /etc/news ] || exit 0
-[ -f /etc/news/inn.conf ] || exit 0
-. /usr/lib/news/lib/innshellvars || exit 0
-[ -d "$SPOOLBASE" ] || exit 0
-[ -f "$HISTORY" -a -f "$HISTORY.hash" ] || {
- echo $"Please run makehistory and/or makedbz before starting innd." >&2
- exit 1
-}
-
RETVAL=0
start() {
- echo -n $"Starting INND system: "
- # INN uses too many un-checked shell scripts
- unset LANG
- unset LC_COLLATE
- daemon --user news /etc/rc.news
- RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/innd
- echo
+ # Check that networking is up.
+ [ "${NETWORKING}" = "no" ] && exit 1
+ [ -d /etc/news ] || exit 1
+ [ -f /etc/news/inn.conf ] || exit 6
+ . /usr/lib/news/lib/innshellvars || exit 1
+ [ -d "$SPOOLBASE" ] || exit 1
+ [ -f "$HISTORY" -a -f "$HISTORY.hash" ] || {
+ echo $"Please run makehistory and/or makedbz before starting innd." >&2
+ exit 1
+ }
+
+ echo -n $"Starting INND system: "
+ # INN uses too many un-checked shell scripts
+ unset LANG
+ unset LC_COLLATE
+ daemon --user news /etc/rc.news
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/innd
+ echo
}
stop() {
- if [ -f /var/run/news/innd.pid ]; then
- echo -n $"Stopping INND service (gently): "
- if "${NEWSBIN}/ctlinnd" -s -t 60 throttle shutting down &&
- sleep 30 &&
- "${NEWSBIN}/ctlinnd" -s -t 60 shutdown shutting down; then
- success $"innd shutdown"
- else
- failure $"innd shutdown"
- echo -n $"Stopping INND service (the hard way): "
- killproc innd
- fi
- RETVAL=$?
- [ $RETVAL -eq 0 ] && rm -f /var/run/news/innd.pid
- echo
- fi
- if [ -f /var/run/news/innwatch.pid ]; then
- echo -n $"Stopping INNWatch service: "
- killproc innwatch -9
- RETVAL=$?
- [ $RETVAL -eq 0 ] && rm -f /var/run/news/innwatch.pid
- echo
- fi
- if [ -f /var/run/news/innfeed.pid ]; then
- echo -n $"Stopping INNFeed service: "
- killproc innfeed -9
- RETVAL=$?
- [ $RETVAL -eq 0 ] && rm -f /var/run/news/innfeed.pid
- echo
- fi
- if [ -f /var/run/news/actived.pid ]; then
- echo -n $"Stopping INN actived service: "
- killproc actived -9
- RETVAL=$?
- [ $RETVAL -eq 0 ] && rm -f /var/run/news/actived.pid
- echo
- fi
- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/innd /var/lock/news/*
+ if [ -f /var/run/news/innd.pid ]; then
+ echo -n $"Stopping INND service (gently): "
+ if "${NEWSBIN}/ctlinnd" -s -t 60 throttle shutting down &&
+ sleep 30 &&
+ "${NEWSBIN}/ctlinnd" -s -t 60 shutdown shutting down; then
+ success $"innd shutdown"
+ else
+ failure $"innd shutdown"
+ echo -n $"Stopping INND service (the hard way): "
+ killproc innd
+ fi
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && rm -f /var/run/news/innd.pid
+ echo
+ fi
+ if [ -f /var/run/news/innwatch.pid ]; then
+ echo -n $"Stopping INNWatch service: "
+ killproc innwatch -9
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && rm -f /var/run/news/innwatch.pid
+ echo
+ fi
+ if [ -f /var/run/news/innfeed.pid ]; then
+ echo -n $"Stopping INNFeed service: "
+ killproc innfeed -9
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && rm -f /var/run/news/innfeed.pid
+ echo
+ fi
+ if [ -f /var/run/news/actived.pid ]; then
+ echo -n $"Stopping INN actived service: "
+ killproc actived -9
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && rm -f /var/run/news/actived.pid
+ echo
+ fi
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/innd /var/lock/news/*
}
reload() {
- echo -n $"Reloading INN Service: "
- killproc innd -HUP
- RETVAL=$?
+ echo -n $"Reloading INN Service: "
+ killproc innd -HUP
+ RETVAL=$?
}
restart() {
- stop
- start
+ stop
+ start
}
# See how we were called.
case "$1" in
start)
- start
- ;;
+ start
+ ;;
stop)
- stop
- ;;
+ stop
+ ;;
status)
- status innd
- RETVAL=$?
- ;;
+ status innd
+ RETVAL=$?
+ ;;
reload)
- #XXX fixme, not working
- #reload
- restart
- ;;
+ #XXX fixme, not working
+ #reload
+ restart
+ ;;
restart)
- restart
- ;;
+ restart
+ ;;
condrestart)
- if [ -f /var/lock/subsys/innd ]; then
- restart
- fi
+ if [ -f /var/lock/subsys/innd ]; then
+ restart
+ fi
;;
*)
- echo $"Usage: $0 {start|stop|status|restart|condrestart}"
- exit 1
+ echo $"Usage: $0 {start|stop|status|restart|condrestart}"
+ exit 3
;;
esac
reply other threads:[~2026-08-26 8:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178773442184.1.11869662902932787887.rpms-inn-8d210b9d6040@fedoraproject.org \
--to=odvorace@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox