Improve socket-activated service handling
This patch provides a more generic way of handling socket-activated
services like dropbear. A socket-activated service only has base socket
unit and spawns service unit with instance name on incoming connection,
so the instanced units of it need to be ignored. And whether a service
is socket-activated can be determined by checking the existance of its
service object path.
Tested:
* Two socket-activated service, dropbear and obmc-console-ssh, can be
controlled as expected.
* Instances of socket-activated services are no loger added to monitor
list.
Change-Id: If8faa2248e5794a410f804125410608aa69b858d
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
diff --git a/inc/srvcfg_manager.hpp b/inc/srvcfg_manager.hpp
index f94e4ea..f70d6a0 100644
--- a/inc/srvcfg_manager.hpp
+++ b/inc/srvcfg_manager.hpp
@@ -99,8 +99,7 @@
bool unitEnabledState = false;
bool unitRunningState = false;
- // dropbear is handled specially because it is a socket-activated service.
- bool isDropBearService = false;
+ bool isSocketActivatedService = false;
std::string subStateValue;
bool isMaskedOut();