ocfs2-tools/ocfs2-devel.diff

127 lines
3.3 KiB
Diff

Only in upstream: .gitignore
Only in dev: .hgtags
--- upstream/ocfs2_controld/main.c 2008-10-27 14:55:50.000000000 +0100
+++ dev/ocfs2_controld/main.c 2008-10-27 14:57:24.000000000 +0100
@@ -1027,6 +1027,7 @@ static void lockfile(void)
static void daemonize(void)
{
+ int fd;
pid_t pid = fork();
if (pid < 0) {
perror("main: cannot fork");
@@ -1040,6 +1041,18 @@ static void daemonize(void)
close(0);
close(1);
close(2);
+ fd = open("/dev/null", O_RDWR);
+ if (fd >= 0) {
+ /* dup2 to 0 / 1 / 2 (stdin / stdout / stderr) */
+ dup2(fd, STDIN_FILENO); /* 0 */
+ dup2(fd, STDOUT_FILENO); /* 1 */
+ dup2(fd, STDERR_FILENO); /* 2 */
+
+ /* Should be 0, but just in case it isn't... */
+ if (fd > 2) {
+ close(fd);
+ }
+ }
openlog("ocfs2_controld", LOG_PID, LOG_DAEMON);
lockfile();
--- upstream/ocfs2_controld/pacemaker.c 2008-09-11 16:51:11.000000000 +0200
+++ dev/ocfs2_controld/pacemaker.c 2008-10-23 13:14:56.000000000 +0200
@@ -20,8 +20,16 @@
#include <unistd.h>
#include <syslog.h>
-#include <crm/crm.h>
-#include <crm/common/cluster.h>
+#include <bzlib.h>
+
+#include <pacemaker/crm_config.h>
+/* heartbeat support is irrelevant here */
+#undef SUPPORT_HEARTBEAT
+#define SUPPORT_HEARTBEAT 0
+
+#include <pacemaker/crm/crm.h>
+#include <pacemaker/crm/ais.h>
+#include <pacemaker/crm/common/cluster.h>
#include <fencing/stonithd_api.h>
#include "ocfs2-kernel/kernel-list.h"
@@ -29,9 +37,6 @@
#include "ocfs2_controld.h"
-#include <bzlib.h>
-#include <crm/crm.h>
-#include <crm/ais.h>
#include <sys/utsname.h>
int our_nodeid = 0;
Only in dev: static.patch
Only in dev/tunefs.ocfs2: Makefile.rej
--- upstream/vendor/common/o2cb.init.sh 2008-09-11 16:51:11.000000000 +0200
+++ dev/vendor/common/o2cb.init.sh 2008-10-23 14:36:49.000000000 +0200
@@ -8,7 +8,8 @@
# Provides: o2cb
# Required-Start: $network
# Should-Start:
-# Required-Stop:
+# Should-Stop:
+# Required-Stop: $null
# Default-Start: 2 3 5
# Default-Stop:
# Short-Description: Load O2CB cluster services at system boot.
@@ -653,7 +654,7 @@ status_filesystem()
status_daemon()
{
- DAEMON="/sbin/ocfs2_controld.${O2CB_STACK}"
+ DAEMON="/usr/sbin/ocfs2_controld.${O2CB_STACK}"
echo -n "Checking for control daemon: "
if [ -n "$(pidofproc "$DAEMON")" ]
then
@@ -667,7 +668,7 @@ status_daemon()
bringup_daemon()
{
- DAEMON="/sbin/ocfs2_controld.${O2CB_STACK}"
+ DAEMON="/usr/sbin/ocfs2_controld.${O2CB_STACK}"
echo -n "Starting $(basename "$DAEMON"): "
start_daemon "$DAEMON"
[ $? != 0 ] && return 1
@@ -682,6 +683,7 @@ bringup_daemon()
fi
sleep 1
done
+ sleep 2
return 0
}
@@ -689,7 +691,7 @@ bringup_daemon()
kill_daemon()
{
SIGNAL="$1"
- DAEMON="/sbin/ocfs2_controld.${O2CB_STACK}"
+ DAEMON="/usr/sbin/ocfs2_controld.${O2CB_STACK}"
status_daemon >/dev/null 2>&1 || return 2
--- upstream/vendor/common/ocfs2.init 2008-09-11 16:51:11.000000000 +0200
+++ dev/vendor/common/ocfs2.init 2008-10-23 13:13:55.000000000 +0200
@@ -8,9 +8,9 @@
### BEGIN INIT INFO
# Provides: ocfs2
# Required-Start: $network o2cb
-# Required-Stop:
-# X-UnitedLinux-Should-Start:
-# X-UnitedLinux-Should-Stop:
+# Required-Stop: $null
+# Should-Start:
+# Should-Stop:
# Default-Start: 2 3 5
# Default-Stop:
# Short-Description: Mount OCFS2 volumes at boot.