Fix init.d PATH bug issue #5034

This is to fix issue #5034.