I am currently remotely upgrading a friend's computer with aptitude through SSH. I have bad memories of unstable systems when they are rebooted/shut down during an upgrade process, so I'd like to prevent him from rebooting the computer (he has a desktop session opened) when he comes back home if the upgrade is still running - or at least warn him.
How do I do that?