Linux shutdown improvements (patch by Petr Pisar)