提交 6ce6ab31 编写于 作者: D Daniel Beck

Merge pull request #1397 from OEP/fix-ignored-umask

Explicitly set the umask for daemon in Debian init script
......@@ -23,7 +23,11 @@ SCRIPTNAME=/etc/init.d/$NAME
#DAEMON=$JENKINS_SH
DAEMON=/usr/bin/daemon
DAEMON_ARGS="--name=$NAME --inherit --env=JENKINS_HOME=$JENKINS_HOME --output=$JENKINS_LOG --pidfile=$PIDFILE"
DAEMON_ARGS="--name=$NAME --inherit --env=JENKINS_HOME=$JENKINS_HOME --output=$JENKINS_LOG --pidfile=$PIDFILE"
if [ -n "$UMASK" ]; then
DAEMON_ARGS="$DAEMON_ARGS --umask=$UMASK"
fi
SU=/bin/su
......@@ -108,10 +112,9 @@ do_start()
ulimit -n $MAXOPENFILES
fi
# honor umask setting
# notify of explicit umask
if [ -n "$UMASK" ]; then
[ "$VERBOSE" != no ] && echo Setting umask to $UMASK
umask $UMASK
fi
# --user in daemon doesn't prepare environment variables like HOME, USER, LOGNAME or USERNAME,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册