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

Re: Shutdown computer after a specific command has been executed



On Jo, 12 dec 13, 16:15:44, Ralf Mardorf wrote:
> On Thu, 2013-12-12 at 16:10 +0100, Ralf Mardorf wrote:
> > sudo sh -c "apt-get update && apt-get dist-upgrade -y ; poweroff"
> 
> sudo sh -c "apt-get update && apt-get dist-upgrade --dry-run ; apt-get
> dist-upgrade -y ; poweroff"
> 
> -y without a dry run :S, OTOH, the OP want's to go to sleep, so the
> dry-run first doesn't improve something.
> 
> It's simply a bad idea to automate an upgrade. 

Simple:

sudo sh -c "apt-get update && apt-get --download-only -y dist-upgrade ; poweroff"

and do the upgrade the next day, under human supervision.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
http://nuvreauspam.ro/gpg-transition.txt

Attachment: signature.asc
Description: Digital signature


Reply to: