[Debian-ha-commits] [ocfs2-tools] 01/11: Move upstream init scripts to /usr/lib/ocfs2-tools
Valentin Vidic
vvidic-guest at moszumanska.debian.org
Wed Jan 24 14:33:23 UTC 2018
This is an automated email from the git hooks/post-receive script.
vvidic-guest pushed a commit to branch master
in repository ocfs2-tools.
commit 68e48fcc3469e7d5def42746be24137fd786bfc9
Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
Date: Wed Jan 24 12:54:42 2018 +0100
Move upstream init scripts to /usr/lib/ocfs2-tools
Fixes lintian warning: systemd-service-file-wraps-init-script
lib/systemd/system/o2cb.service ExecStart
lib/systemd/system/ocfs2.service ExecStart
---
debian/clean | 2 --
debian/ocfs2-tools.o2cb.init | 36 ++++++++++++++++++++++++++++++++
debian/ocfs2-tools.ocfs2.init | 38 ++++++++++++++++++++++++++++++++++
debian/patches/dead_threshold.patch | 4 ++--
debian/patches/o2cb-init-script.patch | 18 ----------------
debian/patches/ocfs2-init-script.patch | 33 -----------------------------
debian/patches/series | 2 --
debian/patches/systemd-service.patch | 10 ++++-----
debian/rules | 10 +++++----
9 files changed, 87 insertions(+), 66 deletions(-)
diff --git a/debian/clean b/debian/clean
index 7f9803e..c43d157 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1,6 +1,4 @@
configure
-debian/ocfs2-tools.o2cb.*
-debian/ocfs2-tools.ocfs2.*
o2info/libo2info.a
ocfs2console/ocfs2interface/*.so
ocfs2console/ocfs2interface/confdefs.py
diff --git a/debian/ocfs2-tools.o2cb.init b/debian/ocfs2-tools.o2cb.init
new file mode 100644
index 0000000..f588930
--- /dev/null
+++ b/debian/ocfs2-tools.o2cb.init
@@ -0,0 +1,36 @@
+#!/bin/sh
+# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
+if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
+ set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
+fi
+### BEGIN INIT INFO
+# Provides: o2cb
+# Required-Start: $network $local_fs
+# Required-Stop: $network $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Load O2CB cluster services at system boot
+# Description: Load OCFS2 kernel modules and start O2CB services
+### END INIT INFO
+
+# Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
+
+DESC="O2CB cluster services"
+DAEMON=/usr/lib/ocfs2-tools/o2cb
+PIDFILE=none
+
+do_start_override() {
+ $DAEMON start
+}
+
+do_stop_override() {
+ $DAEMON stop
+}
+
+do_restart_override() {
+ $DAEMON restart
+}
+
+do_status_override() {
+ $DAEMON status
+}
diff --git a/debian/ocfs2-tools.ocfs2.init b/debian/ocfs2-tools.ocfs2.init
new file mode 100644
index 0000000..3e2efa9
--- /dev/null
+++ b/debian/ocfs2-tools.ocfs2.init
@@ -0,0 +1,38 @@
+#!/bin/sh
+# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
+if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
+ set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
+fi
+### BEGIN INIT INFO
+# Provides: ocfs2
+# Required-Start: $network $local_fs o2cb
+# Required-Stop: $network $local_fs o2cb
+# Should-Start: drbd iscsi multipath-tools
+# Should-Stop: drbd iscsi multipath-tools
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Mount OCFS2 volumes at boot
+# Description: Mount OCFS2 filesystems from /etc/fstab
+### END INIT INFO
+
+# Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
+
+DESC="Oracle Cluster File System (OCFS2)"
+DAEMON=/usr/lib/ocfs2-tools/ocfs2
+PIDFILE=none
+
+do_start_override() {
+ $DAEMON start
+}
+
+do_stop_override() {
+ $DAEMON stop
+}
+
+do_restart_override() {
+ $DAEMON restart
+}
+
+do_status_override() {
+ $DAEMON status
+}
diff --git a/debian/patches/dead_threshold.patch b/debian/patches/dead_threshold.patch
index 2ff42cc..6546d4b 100644
--- a/debian/patches/dead_threshold.patch
+++ b/debian/patches/dead_threshold.patch
@@ -19,7 +19,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
#define SYS_DEBUG_DIR "/sys/kernel/debug"
--- a/vendor/common/o2cb.init.sh
+++ b/vendor/common/o2cb.init.sh
-@@ -234,7 +234,7 @@
+@@ -235,7 +235,7 @@
set_timeouts_o2cb()
{
O2CB_HEARTBEAT_THRESHOLD_FILE_OLD=/proc/fs/ocfs2_nodemanager/hb_dead_threshold
@@ -28,7 +28,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
if [ -n "$O2CB_HEARTBEAT_THRESHOLD" ]; then
if [ -f "$O2CB_HEARTBEAT_THRESHOLD_FILE" ]; then
echo "$O2CB_HEARTBEAT_THRESHOLD" > "$O2CB_HEARTBEAT_THRESHOLD_FILE"
-@@ -269,7 +269,7 @@
+@@ -270,7 +270,7 @@
{
O2CB_HEARTBEAT_THRESHOLD_FILE_OLD=/proc/fs/ocfs2_nodemanager/hb_dead_threshold
diff --git a/debian/patches/o2cb-init-script.patch b/debian/patches/o2cb-init-script.patch
deleted file mode 100644
index 3eeb731..0000000
--- a/debian/patches/o2cb-init-script.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/vendor/common/o2cb.init.sh
-+++ b/vendor/common/o2cb.init.sh
-@@ -6,11 +6,10 @@
- #
- ### BEGIN INIT INFO
- # Provides: o2cb
--# Required-Start: $network
--# Should-Start:
--# Required-Stop:
--# Default-Start: 2 3 5
--# Default-Stop:
-+# Required-Start: $network $local_fs
-+# Required-Stop: $network $local_fs
-+# Default-Start: 2 3 4 5
-+# Default-Stop: 0 1 6
- # Short-Description: Load O2CB cluster services at system boot.
- # Description: Load O2CB cluster services at system boot.
- ### END INIT INFO
diff --git a/debian/patches/ocfs2-init-script.patch b/debian/patches/ocfs2-init-script.patch
deleted file mode 100644
index af8658e..0000000
--- a/debian/patches/ocfs2-init-script.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/vendor/common/ocfs2.init
-+++ b/vendor/common/ocfs2.init
-@@ -7,16 +7,24 @@
- #
- ### BEGIN INIT INFO
- # Provides: ocfs2
--# Required-Start: $network o2cb
--# Required-Stop:
--# X-UnitedLinux-Should-Start:
--# X-UnitedLinux-Should-Stop:
--# Default-Start: 2 3 5
--# Default-Stop:
-+# Required-Start: $local_fs $network o2cb
-+# Required-Stop: $local_fs $network o2cb
-+# Should-Start: drbd iscsi multipath-tools
-+# Should-Stop: drbd iscsi multipath-tools
-+# Default-Start: 2 3 4 5
-+# Default-Stop: 0 1 6
- # Short-Description: Mount OCFS2 volumes at boot.
- # Description: Mount OCFS2 volumes at boot.
- ### END INIT INFO
-
-+# Let's try to use the LSB functions
-+. /lib/lsb/init-functions
-+if [ $? != 0 ]
-+then
-+ echo "Unable to load LSB init functions" >&2
-+ exit 1
-+fi
-+
- if [ -f /etc/redhat-release ]
- then
- . /etc/init.d/functions
diff --git a/debian/patches/series b/debian/patches/series
index b7b8080..19f1798 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,4 @@
libo2dlm-dlopen-libdlm_lt.patch
-ocfs2-init-script.patch
-o2cb-init-script.patch
dead_threshold.patch
systemd-service.patch
parallel-build.patch
diff --git a/debian/patches/systemd-service.patch b/debian/patches/systemd-service.patch
index ea42f89..e67eb24 100644
--- a/debian/patches/systemd-service.patch
+++ b/debian/patches/systemd-service.patch
@@ -13,8 +13,8 @@
RemainAfterExit=yes
-ExecStart=/sbin/o2cb.init enable
-ExecStop=/sbin/o2cb.init disable
-+ExecStart=/etc/init.d/o2cb start
-+ExecStop=/etc/init.d/o2cb stop
++ExecStart=/usr/lib/ocfs2-tools/o2cb start
++ExecStop=/usr/lib/ocfs2-tools/o2cb stop
[Install]
WantedBy=multi-user.target
@@ -27,9 +27,9 @@
-ExecStart=/sbin/ocfs2.init start
-ExecStop=/sbin/ocfs2.init stop
-ExecReload=/sbin/ocfs2.init restart
-+ExecStart=/etc/init.d/ocfs2 start
-+ExecStop=/etc/init.d/ocfs2 stop
-+ExecReload=/etc/init.d/ocfs2 restart
++ExecStart=/usr/lib/ocfs2-tools/ocfs2 start
++ExecStop=/usr/lib/ocfs2-tools/ocfs2 stop
++ExecReload=/usr/lib/ocfs2-tools/ocfs2 restart
[Install]
WantedBy=multi-user.target
diff --git a/debian/rules b/debian/rules
index d739c9c..5290088 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,9 +13,11 @@ override_dh_auto_configure:
dh_auto_configure -- --disable-debug --enable-dynamic-ctl --enable-dynamic-fsck
override_dh_installinit:
- cp -f vendor/common/o2cb.init debian/ocfs2-tools.o2cb.init
- cp -f vendor/common/ocfs2.init debian/ocfs2-tools.ocfs2.init
- cp -f vendor/common/o2cb.service debian/ocfs2-tools.o2cb.service
- cp -f vendor/common/ocfs2.service debian/ocfs2-tools.ocfs2.service
+ mkdir -p debian/ocfs2-tools/usr/lib/ocfs2-tools
+ cp -f vendor/common/o2cb.init debian/ocfs2-tools/usr/lib/ocfs2-tools/o2cb
+ cp -f vendor/common/ocfs2.init debian/ocfs2-tools/usr/lib/ocfs2-tools/ocfs2
+ mkdir -p debian/ocfs2-tools/lib/systemd/system
+ cp -f vendor/common/o2cb.service debian/ocfs2-tools/lib/systemd/system
+ cp -f vendor/common/ocfs2.service debian/ocfs2-tools/lib/systemd/system
dh_installinit -pocfs2-tools --name=o2cb --no-stop-on-upgrade --no-restart-after-upgrade
dh_installinit -pocfs2-tools --name=ocfs2 --no-stop-on-upgrade --no-restart-after-upgrade
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/ocfs2-tools.git
More information about the Debian-HA-Commits
mailing list