Bug 246903 - Initscript Review
Initscript Review
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: ddclient (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Robert Scheck
Fedora Extras Quality Assurance
: FutureFeature
Depends On:
Blocks: InitscriptStatus
  Show dependency treegraph
 
Reported: 2007-07-05 09:49 EDT by Harald Hoyer
Modified: 2010-06-21 21:11 EDT (History)
3 users (show)

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


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

  None (edit)
Description Harald Hoyer 2007-07-05 09:49:04 EDT
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-13 23:02:06 EDT
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 18:41:39 EDT
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 02:36:35 EDT
Moving forward as this report is still valid.
Comment 4 J. Randall Owens 2009-08-15 21:25:38 EDT
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-15 21:34:28 EDT
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-15 21:45:01 EDT
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-10 23:33:50 EST
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-21 19:36:53 EST
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 13:00:08 EDT
Already working on that as the package owner seems to be AWOL.
Comment 10 J. Randall Owens 2010-05-01 19:15:11 EDT
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 19:22:02 EDT
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 19:23:59 EDT
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 19:25:50 EDT
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 19:26:40 EDT
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 19:27:06 EDT
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 15:31:35 EDT
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 15:32:25 EDT
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 15:32:28 EDT
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 15:33:14 EDT
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 15:33:20 EDT
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 16:27:22 EDT
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 16:27:58 EDT
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 02:02:23 EDT
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 02:04:50 EDT
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 02:24:05 EDT
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 01:52:37 EDT
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 07:00:05 EDT
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 07:00:48 EDT
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 07:00:51 EDT
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 07:00:52 EDT
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 07:00:56 EDT
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 07:07:56 EDT
Fixed with ddclient-3.8.0-2.
Comment 33 Fedora Update System 2010-06-14 13:07:03 EDT
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 13:08:44 EDT
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 13:23:57 EDT
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-21 21:10:09 EDT
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-21 21:11:42 EDT
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.