Skip to contentSkip to conversation

portmap: Use systemd service type forking instead of oneshot

PATCH In review Shakeel, Muhammad 2 participants 2 messages Jun 11, 2013 – Jun 14, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 portmap: Use systemd service type forking instead of oneshot

From: Muhammad Shakeel <[email protected]>

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.

---
 .../portmap/portmap/portmap.service                |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-connectivity/portmap/portmap/portmap.service +2 -2
index 7f9bc94..a76754f 100644
@@ -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
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 7 lines · Muhammad

From: Muhammad Shakeel <[email protected]>

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.

I wonder why is rpcbind not replacing portmap for ivi ?

Quoted 28 lines
---
 .../portmap/portmap/portmap.service                |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-connectivity/portmap/portmap/portmap.service +2 -3
index 7f9bc94..a76754f 100644
@@ -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

_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto