[PATCH] Core: Add utilities for managing multiple objects
by Zane Bitter
Signed-off-by: Zane Bitter <zbitter(a)redhat.com>
---
matahari.spec.in | 1
src/CMakeLists.txt | 1
src/include/matahari/object.h | 64 +++++++++++++++++++++++++++++
src/lib/CMakeLists.txt | 2 -
src/lib/mh_object.cpp | 90 +++++++++++++++++++++++++++++++++++++++++
5 files changed, 157 insertions(+), 1 deletions(-)
create mode 100644 src/include/matahari/object.h
create mode 100644 src/lib/mh_object.cpp
diff --git a/matahari.spec.in b/matahari.spec.in
index b0db60a..c40f9fb 100644
--- a/matahari.spec.in
+++ b/matahari.spec.in
@@ -658,6 +658,7 @@ test "x%{buildroot}" != "x" && rm -rf %{buildroot}
%if %{with qmf}
%{_includedir}/matahari/agent.h
+%{_includedir}/matahari/object.h
%{_includedir}/matahari/mainloop.h
%{_datadir}/cmake/Modules/FindQPID.cmake
%endif
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e305951..14a4bd5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -206,6 +206,7 @@ install(FILES cmake/modules/MatahariMacros.cmake DESTINATION share/cmake/Modules
if(WITH-QMF)
install(FILES cmake/modules/FindQPID.cmake DESTINATION share/cmake/Modules)
install(FILES include/matahari/agent.h DESTINATION include/matahari)
+ install(FILES include/matahari/object.h DESTINATION include/matahari)
install(FILES include/matahari/mainloop.h DESTINATION include/matahari)
endif(WITH-QMF)
diff --git a/src/include/matahari/object.h b/src/include/matahari/object.h
new file mode 100644
index 0000000..36603fd
--- /dev/null
+++ b/src/include/matahari/object.h
@@ -0,0 +1,64 @@
+/* mh_object.cpp - Copyright (C) 2011 Red Hat, Inc.
+ * Written by Zane Bitter <zbitter(a)redhat.com>
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __MATAHARI_OBJECT_H
+#define __MATAHARI_OBJECT_H
+
+#include <qmf/AgentEvent.h>
+#include <qmf/AgentSession.h>
+#include <qmf/Schema.h>
+#include <qmf/Data.h>
+#include <qmf/DataAddr.h>
+
+
+class MatahariObject
+{
+public:
+ MatahariObject(qmf::Schema schema);
+ virtual ~MatahariObject();
+
+ qmf::Data& getData(void) { return _instance; }
+ const qmf::DataAddr& getAddr(void) { return _instance.getAddr(); }
+
+ virtual bool invoke(qmf::AgentSession session, qmf::AgentEvent event)
+ { return false; }
+
+protected:
+ qmf::Data _instance;
+};
+
+
+class ObjectManagerImpl;
+
+class ObjectManager
+{
+public:
+ ObjectManager(qmf::AgentSession session);
+ ~ObjectManager();
+
+ ObjectManager& operator+=(MatahariObject* object);
+ ObjectManager& operator-=(MatahariObject* object);
+
+ bool invoke(qmf::AgentSession& session, qmf::AgentEvent& event) const;
+
+private:
+ ObjectManagerImpl *_impl;
+};
+
+#endif
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
index b5ab0f7..67cad82 100644
--- a/src/lib/CMakeLists.txt
+++ b/src/lib/CMakeLists.txt
@@ -43,7 +43,7 @@ else(WIN32)
endif(WIN32)
if(WITH-QMF)
- add_library (mcommon_qmf SHARED mh_agent.cpp)
+ add_library (mcommon_qmf SHARED mh_agent.cpp mh_object.cpp)
set_target_properties(mcommon_qmf PROPERTIES SOVERSION 1.0.0)
target_link_libraries(mcommon_qmf mcommon ${QPIDCOMMON_LIBRARY}
diff --git a/src/lib/mh_object.cpp b/src/lib/mh_object.cpp
new file mode 100644
index 0000000..c55f095
--- /dev/null
+++ b/src/lib/mh_object.cpp
@@ -0,0 +1,90 @@
+/* mh_object.cpp - Copyright (C) 2011 Red Hat, Inc.
+ * Written by Zane Bitter <zbitter(a)redhat.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "config.h"
+
+#include <map>
+#include <matahari/object.h>
+
+
+struct ObjectManagerImpl
+{
+ ObjectManagerImpl(qmf::AgentSession& session): _session(session) { }
+
+ MatahariObject *find(const qmf::DataAddr& addr);
+
+
+ typedef std::map<const qmf::DataAddr, MatahariObject*> map;
+
+ qmf::AgentSession& _session;
+ map _objects;
+};
+
+
+MatahariObject *ObjectManagerImpl::find(const qmf::DataAddr& addr)
+{
+ map::const_iterator it(_objects.find(addr));
+ return it != _objects.end() ? it->second : NULL;
+}
+
+ObjectManager::ObjectManager(qmf::AgentSession session):
+ _impl(new ObjectManagerImpl(session))
+{ }
+
+ObjectManager::~ObjectManager()
+{
+ delete _impl;
+}
+
+ObjectManager& ObjectManager::operator+=(MatahariObject* object)
+{
+ ObjectManagerImpl::map::value_type pair(object->getAddr(), object);
+ _impl->_objects.insert(pair);
+ _impl->_session.addData(object->getData());
+
+ return *this;
+}
+
+ObjectManager& ObjectManager::operator-=(MatahariObject* object)
+{
+ _impl->_session.delData(object->getAddr());
+ _impl->_objects.erase(object->getAddr());
+
+ return *this;
+}
+
+bool ObjectManager::invoke(qmf::AgentSession& session,
+ qmf::AgentEvent& event) const
+{
+ if (event.hasDataAddr()) {
+ MatahariObject *obj = _impl->find(event.getDataAddr());
+
+ if (obj) {
+ return obj->invoke(session, event);
+ }
+ }
+
+ return false;
+}
+
+
+MatahariObject::MatahariObject(qmf::Schema schema): _instance(schema)
+{ }
+
+MatahariObject::~MatahariObject()
+{ }
12 years, 5 months
[PATCH] Broker: support broker on windows
by Adam Stokes
- Routines added to support running a broker standalone
and in a federation setup.
- Had to use a variant of strtok_r to support windows
Signed-off-by: Adam Stokes <astokes(a)fedoraproject.org>
---
src/broker/CMakeLists.txt | 4 +---
src/broker/broker_federation.c | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/broker/CMakeLists.txt b/src/broker/CMakeLists.txt
index 07ddbef..bce39ed 100644
--- a/src/broker/CMakeLists.txt
+++ b/src/broker/CMakeLists.txt
@@ -1,11 +1,10 @@
SET(BROKER_DAEMON "matahari-brokerd")
if(WITH-QMF)
-if(NOT WIN32)
add_executable(${BROKER_DAEMON} broker.c broker_federation.c broker_${VARIANT}.c)
+ target_link_libraries(${BROKER_DAEMON} ${glib_LIBRARIES} mcommon)
if(HAVE_RESOLV_H)
- target_link_libraries(${BROKER_DAEMON} mcommon)
target_link_libraries(${BROKER_DAEMON} resolv)
endif(HAVE_RESOLV_H)
@@ -34,6 +33,5 @@ if(NOT WIN32)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/matahari-broker.service DESTINATION ${systemdunitdir})
endif(systemd_FOUND)
-endif(NOT WIN32)
endif(WITH-QMF)
diff --git a/src/broker/broker_federation.c b/src/broker/broker_federation.c
index 173f437..27156a1 100644
--- a/src/broker/broker_federation.c
+++ b/src/broker/broker_federation.c
@@ -133,7 +133,7 @@ broker_federation_configure(void)
mh_string_copy(peers, brokers, sizeof(peers));
- while ((peer = strtok_r(p ? NULL : peers, ",; ", &p)) != NULL) {
+ while ((peer = strtok(peers, ",; ")) != NULL) {
if (IS_DNS_SRV(peer, TCP) || IS_DNS_SRV(peer, TLS)) {
peer = broker_lookup(peer);
}
--
1.7.6.4
12 years, 5 months
[PATCH 1/5] sysconfig: Unify results of run_uri and run_string commands
by Radek Novacek
Both run_uri and run_string commands should return string in this format:
OK\n<data>
or
FAILED\n<code>\n<data>
Where <data> is arbitrary optional data per backend and <code> is
error code from the backend.
---
src/lib/sysconfig_linux.c | 20 +++++++++++---------
src/sysconfig/schema.xml | 2 +-
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/lib/sysconfig_linux.c b/src/lib/sysconfig_linux.c
index 9a9ab0e..9f80c4f 100644
--- a/src/lib/sysconfig_linux.c
+++ b/src/lib/sysconfig_linux.c
@@ -304,7 +304,7 @@ run_augeas(const char *uri, const char *data, const char *key,
GError *err = NULL;
augeas *aug;
int result;
- char *value = NULL;
+ char *value = NULL, *result_str;
enum mh_result res = MH_RES_SUCCESS;
if (uri) {
@@ -382,21 +382,23 @@ run_augeas(const char *uri, const char *data, const char *key,
g_free(text);
fclose(fp);
- if (result < 0) {
- unlink(filename);
- mh_err("Augeas command failed");
- return MH_RES_BACKEND_ERROR;
- }
-
if (!g_file_get_contents(filename, &value, NULL, &err)) {
mh_err("Unable to read augeas results: %s", err->message);
unlink(filename);
return MH_RES_BACKEND_ERROR;
}
- mh_sysconfig_set_configured(key, value);
- result_cb(cb_data, result);
+ if (result < 0) {
+ asprintf(&result_str, "FAILED\n%d\n%s", result, value);
+ mh_sysconfig_set_configured(key, result_str);
+ result_cb(cb_data, MH_RES_SUCCESS);
+ } else {
+ asprintf(&result_str, "OK\n%s", value);
+ mh_sysconfig_set_configured(key, result_str);
+ result_cb(cb_data, MH_RES_SUCCESS);
+ }
+ free(result_str);
unlink(filename);
return 0;
diff --git a/src/sysconfig/schema.xml b/src/sysconfig/schema.xml
index 0635a09..c4b67a4 100644
--- a/src/sysconfig/schema.xml
+++ b/src/sysconfig/schema.xml
@@ -36,7 +36,7 @@
</itemizedlist>" />
<arg name="scheme" dir="I" type="sstr" desc="File format of configuration file. Currently supported are <literal>puppet</literal> and <literal>augeas</literal>." />
<arg name="key" dir="I" type="sstr" desc="Key will be associated with the result of the command. The key can be used in <xref linkend='Sysconfig_is_configured' />." />
- <arg name="status" dir="O" type="sstr" desc="Result of the command." />
+ <arg name="status" dir="O" type="sstr" desc="Status of the call contains newline separated records. First line is 'OK' or 'FAILED'. 'FAILED' status has return code on second line. The rest of the status message is optional data that differs per scheme." />
</method>
<method name="run_string" desc="Configure system using given configuration text. Most arguments are the same as <xref linkend='Sysconfig_run_uri' />">
--
1.7.7
12 years, 6 months
[PATCH] Services: Make wait times for processes more accurate
by Zane Bitter
Previously we would round the number of milliseconds to wait for down to
the second, and then wait an extra second if the child had still not exited
before attempting to kill it. Now we wait for the child to exit for the
number of milliseconds requested and kill it only if it has not already
exited by then.
Signed-off-by: Zane Bitter <zbitter(a)redhat.com>
---
src/lib/services_linux.c | 30 +++++++++++++++++++++++++-----
1 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/src/lib/services_linux.c b/src/lib/services_linux.c
index 92e62f1..bfd64a8 100644
--- a/src/lib/services_linux.c
+++ b/src/lib/services_linux.c
@@ -23,6 +23,7 @@
#include <sys/wait.h>
#include <errno.h>
#include <unistd.h>
+#include <time.h>
#include <dirent.h>
#include <fcntl.h>
#include <string.h>
@@ -346,15 +347,34 @@ services_os_action_execute(svc_action_t* op, gboolean synchronous)
if (synchronous) {
int status = 0;
- int timeout = 1 + op->timeout / 1000;
+ int ret;
+ int interrupted = 0;
+ unsigned long timeout_ms = op->timeout;
+ struct timespec req, rem;
mh_trace("Waiting for %d", op->pid);
- while (timeout > 0 && waitpid(op->pid, &status, WNOHANG) <= 0) {
- sleep(1);
- timeout--;
+ while ((ret = waitpid(op->pid, &status, WNOHANG)) <= 0) {
+ if (timeout_ms > 0 || interrupted) {
+ if (interrupted) {
+ req = rem;
+ } else {
+ if (timeout_ms / 1000) {
+ req.tv_sec = 1;
+ req.tv_nsec = 0;
+ timeout_ms -= 1000;
+ } else {
+ req.tv_sec = 0;
+ req.tv_nsec = timeout_ms * 1000000L;
+ timeout_ms = 0;
+ }
+ }
+ interrupted = nanosleep(&req, &rem) < 0;
+ } else {
+ break;
+ }
}
mh_trace("Child done: %d", op->pid);
- if (timeout == 0) {
+ if (ret <= 0) {
int killrc = sigar_proc_kill(op->pid, 9 /*SIGKILL*/);
op->status = LRM_OP_TIMEOUT;
12 years, 6 months
Query regarding error handling model in matahari
by Vivek Goyal
Hi,
I am little confused about error handling in matahari hence this mail.
Thanks the Zane that he pointed me to libvirt-qmf/src/Exception.h and
told me that one can call raiseException() to flag an error.
Looks like I can send a string and an error code in the error message. I
see some code in matahari which seems to be putting only an error
message string and not an error code in the raised exceptions.
session.raiseException(event, mh_result_to_str(MH_RES_INVALID_ARGS))
Here we seem to be putting only an error string and no error code. So
the end user (client of matahari API), is it supposed to parse the
error strings to figure out what went wrong. There is no notion of
stable error codes?
I also looked at libvirt-qmf and it seems to be putting both error strings
and error codes in the raised exception.
raiseException(session, event, err, STATUS_USER + ret);
It seems to be retrieving ret code from libvirt and then adding it to
STATUS_USER (0x10000). What is STATUS_USER here? Are we planning to use
number below 0x10000 for something else?
Questions.
- Expecting client to parse strings for error handling and not error codes,
is that the right thing to do.
- If client is supposed to use error code if avaialable, how these error
codes are communicated to client. Client just knows by looking at the
code that I am dealing with libvirt-qmf and these are error codes?
- I am assuming that error can happen before a message reaches agent. May
be intermediate layers are raising their own exceptions with their own
error codes. If yes, how to resolve any possible error code clashing
between matahari/qpid and agents.
P.S. I am not subscribed to the list, so please keep me CCed in the
response.
Thanks
Vivek
12 years, 6 months
[PATCH] mhsh: return list of supported methods for agent class
by Adam Stokes
Signed-off-by: Adam Stokes <astokes(a)fedoraproject.org>
---
src/mhsh/matahari/core.py | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/mhsh/matahari/core.py b/src/mhsh/matahari/core.py
index 726b8af..e14f46a 100644
--- a/src/mhsh/matahari/core.py
+++ b/src/mhsh/matahari/core.py
@@ -155,7 +155,10 @@ class Manager(object):
seqs.append(m(*args, _async=True, **kwargs))
event.wait(TIMEOUT)
return tuple(results)
-
+
+ def methods(self, classKey):
+ """Return list of available methods for class"""
+ return classKey.getSchema().methods
# Test
if __name__ == '__main__':
@@ -166,5 +169,9 @@ if __name__ == '__main__':
print 'Host', h, 'agents:', tuple(str(a) for a in manager.agents(h))
network = manager.get('Network', agents=manager.agents(manager.hosts()))
print 'Network objects:', network
+ print 'Network supported methods:', manager.methods(network[0])
print 'Network interfaces', [r.iface_map for r in manager.invoke_method(network, 'list')]
+ host = manager.get('Host', agents=manager.agents(manager.hosts()))
+ print 'Host methods:', manager.methods(host[0])
+
--
1.7.6.4
12 years, 6 months
[PATCH] ubuntu: add upstart job files for services handling
by Adam Stokes
Support services out of the box on Ubuntu installs.
Signed-off-by: Adam Stokes <astokes(a)fedoraproject.org>
---
src/cmake/modules/MatahariMacros.cmake | 8 +++++++
sys/CMakeLists.txt | 35 +++++++++++++++++++++++++++++++-
sys/matahari-broker.upstart.in | 31 ++++++++++++++++++++++++++++
sys/matahari.upstart.in | 31 ++++++++++++++++++++++++++++
4 files changed, 104 insertions(+), 1 deletions(-)
create mode 100644 sys/matahari-broker.upstart.in
create mode 100644 sys/matahari.upstart.in
diff --git a/src/cmake/modules/MatahariMacros.cmake b/src/cmake/modules/MatahariMacros.cmake
index d0b5af4..77a2d15 100644
--- a/src/cmake/modules/MatahariMacros.cmake
+++ b/src/cmake/modules/MatahariMacros.cmake
@@ -129,4 +129,12 @@ macro(create_service_scripts BASE)
configure_file(${CMAKE_SOURCE_DIR}/sys/matahari.service.in ${CMAKE_CURRENT_BINARY_DIR}/matahari-${BASE}.service)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/matahari-${BASE}.service DESTINATION ${systemdunitdir})
endif(systemd_FOUND)
+
+ if(IS_DIRECTORY /lib/init)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sys/matahari.upstart.in
+ ${CMAKE_CURRENT_BINARY_DIR}/matahari-${BASE}.upstart)
+ install(FILES ${CMAKE_SOURCE_DIR}/matahari-${BASE}.upstart
+ DESTINATION ${sysconfdir}/init
+ RENAME matahari-${BASE}.conf)
+ endif(IS_DIRECTORY /lib/init)
endmacro(create_service_scripts)
diff --git a/sys/CMakeLists.txt b/sys/CMakeLists.txt
index babd6e4..01a21a9 100644
--- a/sys/CMakeLists.txt
+++ b/sys/CMakeLists.txt
@@ -45,7 +45,31 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/matahari-vios-proxy-guest.init
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/matahari-guest-agent.rules
DESTINATION ${sysconfdir}/udev/rules.d
RENAME 99-matahari-guest-agent.rules)
-
+
+if(IS_DIRECTORY /lib/init)
+
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/matahari.sysconf
+ DESTINATION ${sysconfdir}/default RENAME matahari)
+
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/matahari-broker.sysconf
+ DESTINATION ${sysconfdir}/default RENAME matahari-broker)
+
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/matahari-broker.conf
+ DESTINATION ${sysconfdir})
+
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/matahari-vios-proxy.sysconf
+ DESTINATION ${sysconfdir}/default RENAME matahari-vios-proxy)
+
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/matahari-vios-proxy-host.init
+ DESTINATION ${initdir} RENAME matahari-vios-proxy-host)
+
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/matahari-vios-proxy-guest.init
+ DESTINATION ${initdir} RENAME matahari-vios-proxy-guest)
+
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/matahari-guest-agent.rules
+ DESTINATION ${sysconfdir}/udev/rules.d
+ RENAME 99-matahari-guest-agent.rules)
+endif(IS_DIRECTORY /lib/init)
# Check for systemd
include(FindPkgConfig)
@@ -69,3 +93,12 @@ if(systemd_FOUND)
endif(systemd_FOUND)
+# Check for upstart
+if(IS_DIRECTORY /lib/init)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/matahari-broker.upstart.in
+ ${CMAKE_CURRENT_BINARY_DIR}/matahari-broker.upstart)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/matahari-broker.upstart
+ DESTINATION ${sysconfdir}/init
+ RENAME matahari-broker.conf)
+endif(IS_DIRECTORY /lib/init)
+
diff --git a/sys/matahari-broker.upstart.in b/sys/matahari-broker.upstart.in
new file mode 100644
index 0000000..f3d560f
--- /dev/null
+++ b/sys/matahari-broker.upstart.in
@@ -0,0 +1,31 @@
+# matahari-broker - matahari qpidd broker daemon
+#
+# Matahari Broker is an AMQP broker. It receives, stores, routes and
+# forwards messages using the AMQP protcol.
+
+description "Matahari broker"
+
+start on runlevel [2345]
+stop on runlevel [06]
+
+expect fork
+respawn
+
+pre-start script
+ mkdir -p -m0775 /var/lib/matahari
+ chgrp qpidd /var/lib/matahari
+end script
+
+script
+ if [ -f @sysconfdir@/default/matahari ]; then
+ . @sysconfdir@/default/matahari
+ fi
+ if [ -f @sysconfdir@/default/matahari-broker ]; then
+ . @sysconfdir@/default/matahari-broker
+ fi
+ if [ -f @sysconfdir@/default/matahari-vios-proxy ]; then
+ . @sysconfdir@/default/matahari-vios-proxy
+ fi
+
+ exec start-stop-daemon --start --quiet --chuid qpidd --exec /usr/sbin/matahari-brokerd -- $QPIDD_OPTIONS
+end script
diff --git a/sys/matahari.upstart.in b/sys/matahari.upstart.in
new file mode 100644
index 0000000..f22df09
--- /dev/null
+++ b/sys/matahari.upstart.in
@@ -0,0 +1,31 @@
+# matahari-@BASE@@BASE_SUB@ daemon using the AMQP protocol.
+#
+# Matahari Broker is an AMQP broker. It receives, stores, routes and
+# forwards messages using the AMQP protcol.
+
+description "Matahari @BASE@@BASE_SUB@ daemon using the AMQP protocol."
+
+start on runlevel [2345]
+stop on runlevel [06]
+
+expect fork
+respawn
+
+script
+ if [ -f @sysconfdir@/default/matahari ]; then
+ . @sysconfdir@/default/matahari
+ fi
+
+ MATAHARI_ARGS="$MATAHARI_@DAEMON_TYPE@_ARGS $@BASE@_@DAEMON_TYPE@_ARGS"
+ if [ -n "$MATAHARI_PORT" ]; then
+ MATAHARI_ARGS="--port $MATAHARI_PORT $MATAHARI_ARGS"
+ fi
+ if [ -n "$MATAHARI_BROKER" ]; then
+ MATAHARI_ARGS="--broker $MATAHARI_BROKER $MATAHARI_ARGS"
+ fi
+
+ export QPID_SSL_CERT_DB
+ export QPID_SSL_CERT_PASSWORD_FILE
+
+ exec matahari-qmf-@BASE@@BASE_SUB@d $MATAHARI_ARGS --daemon
+end script
--
1.7.6.4
12 years, 6 months