Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Automatic Updates

  1. #11
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,287
    Distro
    Xubuntu

    Arrow Re: Automatic Updates

    Thanks schragge.

    http://www.psychocats.net is a great site.

    Would this code as mentioned in the above setup eventually cause an automatic upgrade i.e. from Xubuntu 12.10 to 13.04? I'd rather it just kept 12.10 updated and let me manually upgrade (or more likely install from fresh) to 12.10.

    Code:
    #!/bin/bash
    apt-get update
    apt-get upgrade -y
    apt-get autoclean
    Here is my Software Sources - Updates tab:
    Attached Images Attached Images
    Last edited by Rytron; April 14th, 2013 at 11:33 AM.
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  2. #12
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: Automatic Updates

    No, this won't cause a release upgrade by itself. Moreover, even
    Code:
    apt-get dist-upgrade
    won't, despite the name. But if you change the /etc/apt/sources.list to point to another release, or just add lines for a newer release to this file then both upgrade and dist-upgrade will do a distribution upgrade. This is essentialy what command do-release-upgrade does: it changes /etc/apt/sources.list to point to another release, then runs apt-get to do the actual upgrade.

  3. #13
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,287
    Distro
    Xubuntu

    Re: Automatic Updates

    Thank you schragge for clarifying that.
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  4. #14
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,287
    Distro
    Xubuntu

    Re: Automatic Updates

    There is this directory that I can drop the below autoupdate script into: /etc/cron.daily
    What time of the day would that activate?

    Code:
    #!/bin/bash
    apt-get update
    apt-get upgrade -y
    apt-get autoclean
    Last edited by Rytron; April 16th, 2013 at 02:58 PM.
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  5. #15
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: Automatic Updates

    Depends on whether you have anacron installed (you usually have as part of ubuntu-desktop).
    Without anacron:
    Code:
    awk '/daily/{print "at "$2":"$1}' /etc/crontab
    With anacron:
    Code:
    awk '/daily/{print "at "$2" minutes after boot"}' /etc/anacrontab

  6. #16
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,287
    Distro
    Xubuntu

    Re: Automatic Updates

    Code:
    $ awk '/daily/{print "at "$2":"$1}' /etc/crontab
    at 6:25
    
    $ awk '/daily/{print "at "$2" minutes after boot"}' /etc/anacrontab
    at 5 minutes after boot
    So I just need to install anacron? I presume the "6:25" without anacron is in the morning and would be of no use.
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  7. #17
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: Automatic Updates

    You already have it installed. The file /etc/anacrontab is installed by anacron.

  8. #18
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,287
    Distro
    Xubuntu

    Re: Automatic Updates

    Thanks again schragge.
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  9. #19
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,287
    Distro
    Xubuntu

    Question Re: Automatic Updates

    Would the bash script also update PPA's?

    I setup the script on a secondary PC and put the script in the folder '/etc/cron.daily'. No updates are happening though. I rebooted a few times. It is running Xubuntu 12.04. Anacron is installed it should run 5 minutes after boot but it isn't. Anyone have any ideas on the problem/solution?
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  10. #20
    Join Date
    Apr 2006
    Location
    Ubuntuland
    Beans
    2,118
    Distro
    Ubuntu 13.10 Saucy Salamander

    Lightbulb Re: Automatic Updates

    Quote Originally Posted by Rytron View Post
    Would the bash script also update PPA's?

    I setup the script on a secondary PC and put the script in the folder '/etc/cron.daily'. No updates are happening though. I rebooted a few times. It is running Xubuntu 12.04. Anacron is installed it should run 5 minutes after boot but it isn't. Anyone have any ideas on the problem/solution?
    'apt-get update' updates from ALL repositories in /etc/apt/sources.list

    How do you know what it's doing? Are you checking log files?
    24 beers in a case, 24 hours in a day. Coincidence? I think not!

    Saucy Salamander 64 bit, AMD Phenom II 955 Quad Core 3.2GHz, GeForce 8300
    8G PC2-6400 RAM, 128 GB SSD, Twin 1TB SATA 7200 RPM RAID0

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •