[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt-get dist-upgrade on shutdown ?



On Fri, Jan 24, 2014 at 12:40:26AM +1100, Zenaan Harkness wrote:
> apt-get upgrade seems to have less "reboot requiring" updates.
> 
> There ought be a way to schedule a dist-upgrade, to occur the next
> time I shutdown my computer - not on hibernate/suspend or even logout
> (I work on cmd line here and there).
> 
> Doing a dist-upgrade right when I'm shutting the machine down, is
> usually the most convenient time for me (before bedtime or whatever),
> and so this ought be an easy thing to automate/achieve (as an option
> at least).
> 
> Another reason to do so, if one is normally in a gui, and running sid,
> is that sometimes gui packages break with an upgrade and a logout at
> least is required. Sometimes a reboot is required.

Write a script that runs "apt-get dist-upgrade" with appropriate
options (things to consider might be --assume-yes/--assume-no,
--trivial-only and maybe DEBIAN_FRONTEND=noninteractive. The hazard of
doing an upgrade at shutdown is that you are asked a question and have
walked away from the machine so it never halts).

When you are happy with the script, create an initscript for it that
*starts* in runlevels 0 (halt) and 6 (shutdown). Pitch it to happen
sometime between X (and other user-facing services) stopping and the
network going down.

Attachment: signature.asc
Description: Digital signature


Reply to: