Fixes bug that causes init scripts to fail silently

王权利请求将github/fork/spuder/patch-6合并到master

Created by: spuder

See #5218

合并请求报告