modify librc.c to support .sh init script