handle pid dir in init script. honor toolchain