[yocto] [PATCH 1/3] [meta-ivi] portmap: Use systemd service type forking instead of oneshot

Shakeel, Muhammad muhammad_shakeel at mentor.com
Tue Jun 11 08:30:38 PDT 2013


From: Muhammad Shakeel <muhammad_shakeel at mentor.com>

portmap is a resident program and we want to start it in background.
With service type 'forking' systemd knows that the executable is a daemon.
Although in this case 'oneshot' + 'RemainAfterExit=yes' works but it
is intended for non-resident programs.

Signed-off-by: Muhammad Shakeel <muhammad_shakeel at mentor.com>
---
 .../portmap/portmap/portmap.service                |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/recipes-connectivity/portmap/portmap/portmap.service b/recipes-connectivity/portmap/portmap/portmap.service
index 7f9bc94..a76754f 100644
--- a/recipes-connectivity/portmap/portmap/portmap.service
+++ b/recipes-connectivity/portmap/portmap/portmap.service
@@ -3,9 +3,9 @@ Description=Portmap
 After=connman.service
 
 [Service]
-Type=oneshot
+Type=forking
 ExecStart=/sbin/portmap -l
-RemainAfterExit=yes
+PIDFile=/var/run/portmap.pid
 
 [Install]
 WantedBy=multi-user.target
-- 
1.7.9.5




More information about the yocto mailing list