The fallback reboot mechanism requires write permission to the SysRq proc
interface, so we must call opensaf_reboot_prepare() before daemonize() to make
sure it works properly.
---
src/clm/clmd/clms_main.c | 2 ++
src/clm/clmnd/main.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/clm/clmd/clms_main.c b/src/clm/clmd/clms_main.c
index 0b84aeab9..ecf8e78db 100644
--- a/src/clm/clmd/clms_main.c
+++ b/src/clm/clmd/clms_main.c
@@ -29,6 +29,7 @@
#include <string.h>
#include <time.h>
#include "base/daemon.h"
+#include "base/ncssysf_def.h"
#include "base/osaf_time.h"
#include "clm/clmd/clms.h"
#include "nid/agent/nid_api.h"
@@ -471,6 +472,7 @@ int main(int argc, char *argv[])
int term_fd;
int timeout = -1;
+ opensaf_reboot_prepare();
daemonize(argc, argv);
if (setenv("SA_ENABLE_EXTENDED_NAMES", "1", 1)) {
diff --git a/src/clm/clmnd/main.c b/src/clm/clmnd/main.c
index 183570258..a9661af32 100644
--- a/src/clm/clmnd/main.c
+++ b/src/clm/clmnd/main.c
@@ -30,6 +30,7 @@
#include "base/ncs_util.h"
#include "base/ncsencdec_pub.h"
#include "base/ncsgl_defs.h"
+#include "base/ncssysf_def.h"
#include "base/osaf_poll.h"
#include "base/osaf_time.h"
#include "clm/clmnd/cb.h"
@@ -808,6 +809,7 @@ int main(int argc, char *argv[])
SaAisErrorT error;
int term_fd;
+ opensaf_reboot_prepare();
daemonize(argc, argv);
/* Initialize some basic stuff */
--
2.13.3
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel