Some kernel script changes for mac

Signed-off-by: iceandfire <arhamjamal@gmail.com>