Locking on shutdown is unreliable; lock on boot and then check what is connected