handle reboot case in pre_|post_install scripts