Author Topic: system upgrade  (Read 1190 times)

Offline travica77

  • Newbie
  • *
  • Posts: 27
system upgrade
« on: June 11, 2015, 02:29:20 pm »
Hello,
how can i do that system upgrade can update automaticly and then shutdown computer 
thanks.

Offline pavroo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1465
    • SparkyLinux
Re: system upgrade
« Reply #1 on: June 11, 2015, 03:48:44 pm »
Hi
Code: [Select]
su
apt-get update && apt-get dist-upgrade && poweroff
Nothing is easy as it looks.

Offline travica77

  • Newbie
  • *
  • Posts: 27
Re: system upgrade
« Reply #2 on: June 16, 2015, 02:34:31 pm »
Hi
Code: [Select]
su
apt-get update && apt-get dist-upgrade && poweroff

ok, tkanks, how abaout cron job.

Offline statmonkey

  • Newbie
  • *
  • Posts: 4
Re: system upgrade
« Reply #3 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.

Offline py-thon

  • Jr. Member
  • **
  • Posts: 68
Re: system upgrade
« Reply #4 on: June 20, 2015, 04:22:50 pm »
Sparky is based on Testing, not Sid.

Anyway I would prefer
Code: [Select]
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.
Tower: Sparky 64bit MATE
Netbook: Sparky 32bit MATE