Package: git-daemon-sysvinit
Version: 1:1.7.7.3-1
Severity: wishlist
Tags: patch

Hi Daniel,

When you submitted the /etc/init.d/git-daemon patch, I encouraged
adding a GIT_DAEMON_ENABLE knob so the sysadmin can put

        GIT_DAEMON_ENABLE=false

in /etc/default/git-daemon, then install git-daemon-sysvinit, and
then only enable the daemon once everything is configured properly.

But that was silly of me.  If someone wants to configure git-daemon
before installing it, she can do so by putting conffiles in place
in advance.  The ENABLE knob is not needed for that.

Looking at it from the other side, the package would be more intuitive
and user-friendly if it were not required to flip a switch mentioned
in the README file before it started to work.  And "invoke-rc.d <foo>
disable" is a much nicer interface for turning off an init script.

How about something like this patch?
---
 debian/changelog                         |   11 +++++++++++
 debian/git-daemon-sysvinit.README.Debian |   13 ++++---------
 debian/git-daemon.default                |    1 -
 debian/git-daemon.init                   |    8 +-------
 4 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 53036207..eb1e5ec7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+git (1:1.7.8-1.1) unstable; urgency=low
+
+  * make git-daemon-sysvinit work out of the box.
+    * debian/git-daemon.init, debian/git-daemon.default: remove
+      GIT_DAEMON_ENABLE setting.
+    * debian/git-daemon-sysvinit.README.Debian: update now that
+      the daemon starts by default; explain how to use "invoke-rc.d
+      disable" to disable the service.
+
+ -- Jonathan Nieder <jrnie...@gmail.com>  Fri, 16 Dec 2011 09:08:54 -0600
+
 git (1:1.7.8-1) unstable; urgency=low
 
   * merge branch debian-experimental.
diff --git a/debian/git-daemon-sysvinit.README.Debian 
b/debian/git-daemon-sysvinit.README.Debian
index 320d7001..13a302d9 100644
--- a/debian/git-daemon-sysvinit.README.Debian
+++ b/debian/git-daemon-sysvinit.README.Debian
@@ -4,18 +4,13 @@ git-daemon-sysvinit for Debian
 This package enables a git-daemon service.  This allows people to use a
 git:// URL to access your repositories.
 
-After installing this package, the daemon needs to be enabled in
-/etc/default/git-daemon by setting:
+The git daemon can be stopped with:
 
-  GIT_DAEMON_ENABLE=false
+  # /etc/init.d/git-daemon stop
 
-to:
+To disable it until explicitly re-enabled, use:
 
-  GIT_DAEMON_ENABLE=true
-
-After that, the git daemon can be started with:
-
-  # /etc/init.d/git-daemon start
+  # update-rc.d git-daemon disable
 
 The git daemon by default looks into the directory /var/cache/git/ for
 repositories (this is configured in /etc/default/git-daemon).  It expects
diff --git a/debian/git-daemon.default b/debian/git-daemon.default
index 20208055..6f62b0c8 100644
--- a/debian/git-daemon.default
+++ b/debian/git-daemon.default
@@ -6,7 +6,6 @@
 # This is a POSIX shell fragment
 #
 
-GIT_DAEMON_ENABLE=false
 GIT_DAEMON_USER=gitdaemon
 GIT_DAEMON_DIRECTORY=/var/cache/git
 
diff --git a/debian/git-daemon.init b/debian/git-daemon.init
index 0e97c431..c5988423 100644
--- a/debian/git-daemon.init
+++ b/debian/git-daemon.init
@@ -76,13 +76,7 @@ do_stop()
 
 case "$1" in
   start)
-    if [ $GIT_DAEMON_ENABLE = true ]; then
-       [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
-    else
-       [ "$VERBOSE" != no ] && log_warning_msg "$NAME not enabled in 
/etc/default/$NAME, not starting..."
-       exit 0
-    fi
-
+    [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
     do_start
     case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
-- 
1.7.8




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to