Author Topic: Always up to date.  (Read 1944 times)

Offline Hairyplotter

  • Full Member
  • ***
  • Posts: 52
Always up to date.
« on: June 24, 2009, 05:59:54 PM »
I added this line in my /etc/rc.d/rc.local.

Code: [Select]

apt-get update >> /var/log/apt-get.update.log && apt-get dist-upgrade >> /var/log/apt-get.upgrade.log &

Now I never have to worry about updating my system.
« Last Edit: June 24, 2009, 06:02:15 PM by Hairyplotter »
It is rumored that Bill Gates spent the summer of '77 killing hookers in Arizona, and some claim that their screams can still be heard every time Windows boots up.

Offline omnio

  • Full Member
  • ***
  • Posts: 129
Re: Always up to date.
« Reply #1 on: June 25, 2009, 05:44:10 AM »
I have a couple of problems with your suggestion, first - upgrading a system as a background task is generally seen as a bad idea because it gives you less control over what happens, and second - your way of doing it triggers the upgrade only at boot time, if you really-really want it to happen automatically maybe you should let cron (and anacron) take care of it and do it once per day, or once per week. Just my opinion, users are free to do whatever they want, of course.

Offline parnote

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 4439
  • The truth is out there ... PCLinuxOS!
Re: Always up to date.
« Reply #2 on: June 25, 2009, 06:21:35 AM »
I have to agree with omnio. I would prefer the update process not take place in the background, at least so I know what is going on. Also, only checking at boot would be a bad idea for me. Until I rebooted 5 days ago, my computer went 60 days without a reboot. Other computers in the house have been known to go even longer without a reboot.

It seems to me that using the new update-notifier application would be easier.

Nonetheless, it is an interesting use of a script during boot.

parnote
PCLinuxOS Magazine Chief Editor

Linux Registered User #485009

In a world without walls, who needs Windows?

PCLinuxOS Wiki: Contribute tips/tricks/how-to's!

TeeJayDubYa

  • Guest
Re: Always up to date.
« Reply #3 on: June 25, 2009, 06:47:55 AM »
I have a couple of problems with your suggestion, first - upgrading a system as a background task is generally seen as a bad idea because it gives you less control over what happens, and second - your way of doing it triggers the upgrade only at boot time, if you really-really want it to happen automatically maybe you should let cron (and anacron) take care of it and do it once per day, or once per week. Just my opinion, users are free to do whatever they want, of course.

I have run [and still do] Debian servers for many years using crond to update them automatically, usually on Monday mornings.  It works great.

I would not run it at boot for several reasons and certainly would not recommend it for a newbie with no understanding of what is happening.

Of course, it is all about choice so thats why we discuss options rather than all follow one path.

Servers and desktops are different animals in many ways. Normally only experienced folks run servers and desktops are often run by folks who just want an environment to get their work done with the least overhead of skull sweat [thinking about it].

The true power and joy of Linux in general is the fact that there are choices and options for any use and skill level.

Nnew folks would be well served by going slowly in the command line until they understand what is going on under the hood a little before blindly changing system behavior as it may yield unexpected results.

THe folks that maintane this distro seem to be pretty solid on not busting stuff with updates. However, these are complex systems with no way to test every possible configuration before adding an update.

You would hate to wake up some morning with a bunch of mission critical email or document preparation
on your plate only to boot your computer, watch it update then find out your mission critical email / browser / word processor somehow stopped working because of an update.  

And you promised your boss to have it dealt with before the office opens at 8. Just as ferinstance.

Letting updates propogate awhile might be best for those that just need it to work. Keep an eye on the forum for problems then update.

Its not always best to be "first". Not to scare anyone off but its good to discuss these things.

Might check out that update notifier thing too.

Just my thoughts before much coffee.

Tom




Offline Hairyplotter

  • Full Member
  • ***
  • Posts: 52
Re: Always up to date.
« Reply #4 on: June 25, 2009, 07:09:03 AM »
The only machines I have this enabled on are laptops, so I don't leave them up 24/7.

As far as control over the whole process, I am not sure whats being referred to.
I suppose if you have a specific reason to not upgrade a package, then something like this wouldn't be a very good idea.

If I want to know what has been installed, I just go back and look at the logs.

I don't view this section of the forums as a "one stop solution" to common problems. I look at it more as a starting point to completing a specific task that people may not know how to immediately implement. Sometimes pointing somebody in the right direction or just showing them that something may be possible is all people need to craft a solution that fits their specific needs.
It is rumored that Bill Gates spent the summer of '77 killing hookers in Arizona, and some claim that their screams can still be heard every time Windows boots up.

Offline omnio

  • Full Member
  • ***
  • Posts: 129
Re: Always up to date.
« Reply #5 on: June 30, 2009, 03:55:40 AM »
I guess update-notifier is a the right thing for pclos to have, since it constantly reminds to the users to (fully) upgrade. Maybe without it there would be increased chances that someone, one day, realizes that (s)he needs and application, opens Synaptic and installs it without fully upgrading the system first, and that is something that would work in Debian (or Mepis, if we are to compare friendly distros), but won't work in pclos. On the other hand, for tedious users like me, update-notifier is more like an annoyance, I'd rather open Synaptic and upgrade once per week, or once at 2 weeks, manually. Everyone has his way of doing things.