SparkyLinux Forums

Software & hardware support => Sparky applications => Topic started by: travica77 on June 11, 2015, 02:29:20 PM

Title: system upgrade
Post by: travica77 on June 11, 2015, 02:29:20 PM
Hello,
how can i do that system upgrade can update automaticly and then shutdown computer 
thanks.
Title: Re: system upgrade
Post by: pavroo on June 11, 2015, 03:48:44 PM
Hi
su
apt-get update && apt-get dist-upgrade && poweroff
Title: Re: system upgrade
Post by: travica77 on June 16, 2015, 02:34:31 PM
Quote from: pavroo on June 11, 2015, 03:48:44 PM
Hi
su
apt-get update && apt-get dist-upgrade && poweroff


ok, tkanks, how abaout cron job.
Title: Re: system upgrade
Post by: statmonkey on June 19, 2015, 08:45:12 PM
you could cron that but I would not recommend it.  In fact I would not recommend the above command either, though it's your system and you can do as you wish. 

Apt is doing some pretty serious stuff and not watching/interacting with apt when running a SID distro is really dangerous.  The reason is that SID is by definition unstable, yep we have all been so pampered by the Debian folks that we seem to forget this.  Occasionally (maybe once or twice a year at random times but possibly for as long as a week) SID and the repos are going to be in transition, this means that things will be removed that you don't want removed or broken that are essential.  There will be times where you need to see what apt is doing, actually read it and say -- nope not right now, I'll wait till it calms down.  Really you should pay attention to what apt is doing in detail at every upgrade.

I hate to sound like an old fart but I grew up in the original Aptosid world back when SID was really goofy and have borked more than my fair share of distro's in my day.  I can promise you that you might get away with automagically upgrading for a while but eventually it will bite you and bite you hard.  SID is technically cutting edge and that means the edge can and will cut.  Oops this is sounding lectury and I don't mean that.  Anywho, yes you can put that command in roots cron jobs pretty easily, just know there will be consequences.
Title: Re: system upgrade
Post by: py-thon on June 20, 2015, 04:22:50 PM
Sparky is based on Testing, not Sid.

Anyway I would prefer
sudo apt-get update && sudo apt-get dist-upgrade && sudo poweroff
See https://wiki.debian.org/sudo for the reason (see "Why sudo?").

But either way sometimes the upgrade process will stop halfway to ask whether to keep a configuration file or not so it is advisable to keep an eye on the system. Don't start it and go to bed. You might wake up next morning with your computer still waiting for you to type Y or N.

I would avoid running this as a cron job. Better run it consciously.