浏览代码

package/mender: fix sysv startup script

Mender is a service explicitly written for systemd and so it doesn't
fork on background, doesn't redirect outputs and doesn't create a pid
file by itself.
To make the service running correctly is therefore necessary to use the
-m switch of start-stop-daemon to create the pid file and -b option to
send the process to background.
Logging is preserved because the service will log anyway on syslog.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Angelo Compagnucci 6 年之前
父节点
当前提交
63739c5c25
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      package/mender/S42mender

+ 1 - 1
package/mender/S42mender

@@ -24,7 +24,7 @@ start() {
 	printf "Starting mender service: "
 	umask 077
 
-	start-stop-daemon -S -q -p /var/run/mender.pid \
+	start-stop-daemon -S -q -b -m -p /var/run/mender.pid \
 		--exec /usr/bin/mender -- -daemon
 	[ $? = 0 ] && echo "OK" || echo "FAIL"
 }