Bug 246903 - Initscript Review
Summary: Initscript Review
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ddclient   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Robert Scheck
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: FutureFeature
Depends On:
Blocks: InitscriptStatus
TreeView+ depends on / blocked
 
Reported: 2007-07-05 13:49 UTC by Harald Hoyer
Modified: 2010-06-22 01:11 UTC (History)
3 users (show)

Fixed In Version: ddclient-3.8.0-2.el5
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-29 11:07:56 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
initscript which might comply with the LSB (2.16 KB, text/plain)
2009-08-16 01:25 UTC, J. Randall Owens
no flags Details
Fixed up initscript (2.16 KB, text/plain)
2009-08-16 01:45 UTC, J. Randall Owens
no flags Details

Description Harald Hoyer 2007-07-05 13:49:04 UTC
Please have a look at the wikipage 
http://fedoraproject.org/wiki/FCNewInit/Initscripts
and change your initscripts to comply with the LSB standard.
Especially check the exit status and add a LSB Header.
E.g. starting a service should return with 0, if the service is already running and stopping a stopped service should also return with 0.

Also check, if your service has to be _on_ per default, and turn it off in the old chkconfig line, if not.

Thank you.

Comment 1 Bug Zapper 2008-05-14 03:02:06 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Bug Zapper 2009-06-09 22:41:39 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Robert Scheck 2009-06-10 06:36:35 UTC
Moving forward as this report is still valid.

Comment 4 J. Randall Owens 2009-08-16 01:25:38 UTC
Created attachment 357557 [details]
initscript which might comply with the LSB

I think the attached initscript should meet the LSB requirements, although I'm not too sure about the exit statuses, if someone could check those out.  I think they're pretty much handled by /etc/rc.d/init.d/functions, and I assume it knows what it's doing.  I suppose given that the script is a Source2 instead of part of the tarball or a cat << EOF in the spec, it's easier to just attach the whole script here, but in case it's wanted, the patch is small enough to reasonably fit in here; just remember to fix wrapped lines, should just be the usage at the end:

--- ddclient.initscript.orig	2007-03-03 01:36:48.000000000 -0700
+++ ddclient.initscript	2009-08-15 18:11:58.000000000 -0700
@@ -1,4 +1,14 @@
 #!/bin/sh
+### BEGIN INIT INFO
+# Provides: ddclient
+# Required-Start: $syslog $local_fs $network
+# Should-Start: $named
+# Required-Stop: $syslog $local_fs $network
+# Default-Stop: 0 1 2 3 4 5 6
+# Short-Description: shell script to start and stop ddclient.
+# Description:ddclient is a Perl client used to update dynamic DNS
+#	entries for accounts on many dynamic DNS services 
+### END INIT INFO
 #
 # ddclient      This shell script takes care of starting and stopping ddclient.
 #
@@ -52,28 +62,29 @@
 }
 
 reload() {
-    restart
-}
-
-force_reload() {
-    restart
+    echo -n $"Reloading $prog: "
+    # reload won't be called during update, so go ahead and use -p $pid
+    killproc -p $pid
+    retval=$?
+    echo
+    return $retval
 }
 
 # See how we were called.
 case "$1" in
-    start|stop|restart|reload)
+    start|stop|restart)
         $1
         ;;
-    force-reload)
-        force_reload
+    reload|force-reload)
+        reload
         ;;
     status)
         status -p $pid $prog
         ;;
     try-restart|condrestart)
-        [ ! -f $lockfile ] || restart
+        [ -f $lockfile ] && restart
         ;;
     *)
-        echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
+        echo $"Usage: $0 {start|stop|status|restart|try-restart|condrestart|reload|force-reload}"
         exit 2
 esac

Comment 5 J. Randall Owens 2009-08-16 01:34:28 UTC
Oh!  Besides the fact that it did wrap that second line after END INIT INFO after all, that space which is the second character of the second line of the Description: is supposed to be a tab, but two or more spaces would do just as well.  That's pretty much a must.

Comment 6 J. Randall Owens 2009-08-16 01:45:01 UTC
Created attachment 357558 [details]
Fixed up initscript

Grr... and I missed a space after the colon, and switched the punctuation around....  Might as well just use the updated attachment here, and consider the patch above a rough guide to what's been changed.

Comment 7 J. Randall Owens 2010-01-11 04:33:50 UTC
I'm trying to get this worked into the update from 3.7.3 to 3.8.0, over in Bug 551906, now.

Comment 8 Robert Scheck 2010-02-22 00:36:53 UTC
We still need to change this initscript to not interference with bug #506286.
Directly after "start() {", the following is required as one line

[ ! -f /var/lock/subsys/network -a ! -f /var/lock/subsys/NetworkManager ] && exit 0

Comment 9 Robert Scheck 2010-05-01 17:00:08 UTC
Already working on that as the package owner seems to be AWOL.

Comment 10 J. Randall Owens 2010-05-01 23:15:11 UTC
I've done as much as I can; I don't have the CVS access, or whatever exactly is needed to take it from here. If you can commit, more power to you!

Comment 11 Fedora Update System 2010-05-01 23:22:02 UTC
ddclient-3.8.0-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/ddclient-3.8.0-1.fc13

Comment 12 Fedora Update System 2010-05-01 23:23:59 UTC
ddclient-3.8.0-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/ddclient-3.8.0-1.fc12

Comment 13 Fedora Update System 2010-05-01 23:25:50 UTC
ddclient-3.8.0-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/ddclient-3.8.0-1.fc11

Comment 14 Fedora Update System 2010-05-01 23:26:40 UTC
ddclient-3.8.0-1.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/ddclient-3.8.0-1.el5

Comment 15 Fedora Update System 2010-05-01 23:27:06 UTC
ddclient-3.8.0-1.el4 has been submitted as an update for Fedora EPEL 4.
http://admin.fedoraproject.org/updates/ddclient-3.8.0-1.el4

Comment 16 Fedora Update System 2010-05-02 19:31:35 UTC
ddclient-3.8.0-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/ddclient-3.8.0-1.fc13

Comment 17 Fedora Update System 2010-05-02 19:32:25 UTC
ddclient-3.8.0-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/ddclient-3.8.0-1.fc11

Comment 18 Fedora Update System 2010-05-02 19:32:28 UTC
ddclient-3.8.0-1.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/ddclient-3.8.0-1.el5

Comment 19 Fedora Update System 2010-05-02 19:33:14 UTC
ddclient-3.8.0-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/ddclient-3.8.0-1.fc12

Comment 20 Fedora Update System 2010-05-02 19:33:20 UTC
ddclient-3.8.0-1.el4 has been submitted as an update for Fedora EPEL 4.
http://admin.fedoraproject.org/updates/ddclient-3.8.0-1.el4

Comment 21 Fedora Update System 2010-05-03 20:27:22 UTC
ddclient-3.8.0-1.el4 has been pushed to the Fedora EPEL 4 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ddclient'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/ddclient-3.8.0-1.el4

Comment 22 Fedora Update System 2010-05-03 20:27:58 UTC
ddclient-3.8.0-1.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ddclient'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/ddclient-3.8.0-1.el5

Comment 23 Fedora Update System 2010-05-04 06:02:23 UTC
ddclient-3.8.0-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ddclient'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/ddclient-3.8.0-1.fc12

Comment 24 Fedora Update System 2010-05-04 06:04:50 UTC
ddclient-3.8.0-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ddclient'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/ddclient-3.8.0-1.fc11

Comment 25 Fedora Update System 2010-05-04 06:24:05 UTC
ddclient-3.8.0-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ddclient'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/ddclient-3.8.0-1.fc13

Comment 26 Fedora Admin XMLRPC Client 2010-05-29 05:52:37 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 27 Fedora Update System 2010-05-29 11:00:05 UTC
ddclient-3.8.0-2.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/ddclient-3.8.0-2.fc13

Comment 28 Fedora Update System 2010-05-29 11:00:48 UTC
ddclient-3.8.0-2.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/ddclient-3.8.0-2.fc12

Comment 29 Fedora Update System 2010-05-29 11:00:51 UTC
ddclient-3.8.0-2.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/ddclient-3.8.0-2.fc11

Comment 30 Fedora Update System 2010-05-29 11:00:52 UTC
ddclient-3.8.0-2.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/ddclient-3.8.0-2.el5

Comment 31 Fedora Update System 2010-05-29 11:00:56 UTC
ddclient-3.8.0-2.el4 has been submitted as an update for Fedora EPEL 4.
http://admin.fedoraproject.org/updates/ddclient-3.8.0-2.el4

Comment 32 Robert Scheck 2010-05-29 11:07:56 UTC
Fixed with ddclient-3.8.0-2.

Comment 33 Fedora Update System 2010-06-14 17:07:03 UTC
ddclient-3.8.0-2.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 34 Fedora Update System 2010-06-14 17:08:44 UTC
ddclient-3.8.0-2.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 35 Fedora Update System 2010-06-14 17:23:57 UTC
ddclient-3.8.0-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 36 Fedora Update System 2010-06-22 01:10:09 UTC
ddclient-3.8.0-2.el4 has been pushed to the Fedora EPEL 4 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 37 Fedora Update System 2010-06-22 01:11:42 UTC
ddclient-3.8.0-2.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.