Skip to contentSkip to conversation

init: exec daemons or wrappers after setting up environment

PATCH New Alexandre Oliva 1 participant 1 message Jul 31, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 init: exec daemons or wrappers after setting up environment

Since with systemd we want to start daemons in foreground, adding an exec before the daemon (or wrapper) name saves us a running shell just waiting for the daemon to complete. There's no reason to not do so even when not using systemd, so, done...

---
 src/init-ceph.in |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/init-ceph.in +2 -2
index 95723b0..cc3c3c7 100644
@@ -277,9 +277,9 @@ for name in $what; do
 	    [ -n "$max_open_files" ] && files="ulimit -n $max_open_files;"
 
 	    if [ $SYSTEMD -eq 1 ]; then
-		cmd="systemd-run -r bash -c '$files $cmd --cluster $cluster -f'"
+		cmd="systemd-run -r bash -c '$files exec $cmd --cluster $cluster -f'"
 	    else
-		cmd="$files $wrap $cmd --cluster $cluster $runmode"
+		cmd="$files exec $wrap $cmd --cluster $cluster $runmode"
 	    fi
 
 	    if [ $dofsmount -eq 1 ] && [ -n "$fs_devs" ]; then
Signature · 4 lines
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer