Fixes bug that causes init scripts to fail silently

王权利请求将github/fork/spuder/6-1-stable合并到6-1-stable

Created by: spuder

See #5218 and #5231

This pull request is for the 6-1-stable branch 5218 is the pull request for master branch

合并请求报告