Subject: DAEMON_ARGS in /etc/init.d/salt-minion prevents salt-minion startup

From: Samuli Airaksinen <[email-masked]>
Date: Wed, 3 Feb 2021 18:27:14 +0200

Package: salt-minion
Version: 2018.3.4+dfsg1-6+deb10u2

In /etc/init.d/salt-minion , the line

DAEMON_ARGS="-d"

causes the minion to freeze upon startup. The -d switch, which runs the 
minion in the background, is ok when /usr/bin/salt-minion is ran 
interactively, but causes the minion to freeze when launched via service.

The switch is also warned against at 
https://ansible-cn.readthedocs.io/en/latest/topics/troubleshooting/minion.html 
. In Debian Buster the salt-minion service is also launched without the 
-d argument.

There is no error message. The last log message in log_levels "trace" 
and "garbage" is: "Getting lsb_release distro information", after which 
the minion remains unresponsive.

Emptying the DAEMON_ARGS fixes the problem and enables salt-minion to 
start properly.

Proposed patch:

@@ -15,7 +15,7 @@
  DESC="salt minion control daemon"
  NAME=salt-minion
  DAEMON=/usr/bin/salt-minion
-DAEMON_ARGS="-d"
+DAEMON_ARGS=""
  PIDFILE=/var/run/$NAME.pid
  SCRIPTNAME=/etc/init.d/$NAME