summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Wragg <david@rabbitmq.com>2011-02-19 23:36:36 +0000
committerDavid Wragg <david@rabbitmq.com>2011-02-19 23:36:36 +0000
commit6fa4d3bed077dc59cb2f702675e27201a2a8939b (patch)
tree836032276d400deded640c7ee73f3ccf4b4efcf8
parentd36fa2d13c9f635700c52961f94e6b2ad9110b3d (diff)
downloadrabbitmq-server-git-6fa4d3bed077dc59cb2f702675e27201a2a8939b.tar.gz
Debian needs unusual LSB Default-Start and Default-Stop lines
For Debian and descendants, there is no distinction between runlevel 2 and 3, 4, and 5. So we need to modify the Default-Start and Default-Stop lines in the init script accordingly.
-rw-r--r--packaging/debs/Debian/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/packaging/debs/Debian/Makefile b/packaging/debs/Debian/Makefile
index ab05f73225..221dbe4fec 100644
--- a/packaging/debs/Debian/Makefile
+++ b/packaging/debs/Debian/Makefile
@@ -22,9 +22,13 @@ package: clean
tar -zxvf $(DEBIAN_ORIG_TARBALL)
cp -r debian $(UNPACKED_DIR)
cp $(COMMON_DIR)/* $(UNPACKED_DIR)/debian/
+# Debian and descendants differ from most other distros in that
+# runlevel 2 should start network services.
sed -i \
-e 's|^DEFAULTS_FILE=.*$$|DEFAULTS_FILE=/etc/default/rabbitmq|' \
-e 's|^LOCK_FILE=.*$$|LOCK_FILE=|' \
+ -e 's|^\(# Default-Start:\).*$$|\1 2 3 4 5|' \
+ -e 's|^\(# Default-Stop:\).*$$|\1 0 1 6|' \
$(UNPACKED_DIR)/debian/rabbitmq-server.init
sed -i -e 's|@SU_RABBITMQ_SH_C@|su rabbitmq -s /bin/sh -c|' \
$(UNPACKED_DIR)/debian/rabbitmq-script-wrapper