Skip to content

Instantly share code, notes, and snippets.

@EntropyWorks
Last active April 17, 2018 05:47
Show Gist options
  • Select an option

  • Save EntropyWorks/111a87b7ac8f1d5253acb0479d982236 to your computer and use it in GitHub Desktop.

Select an option

Save EntropyWorks/111a87b7ac8f1d5253acb0479d982236 to your computer and use it in GitHub Desktop.

Revisions

  1. EntropyWorks revised this gist Apr 17, 2018. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions update-pi.sh
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,12 @@ echo -e 'APT::Periodic::MaxAge "14";' | sudo tee /etc/apt/apt.conf.d/99_periodi
    echo -e 'APT::Periodic::MaxSize "1024";\nAPT::Periodic::MinAge "2";' | sudo tee /etc/apt/apt.conf.d/99_periodic_autoclean
    echo -e 'APT::Periodic::AutocleanInterval "10";' | sudo tee /etc/apt/apt.conf.d/99_periodic_autoclean
    echo -e 'APT::Periodic::Verbose "1";' | sudo tee /etc/apt/apt.conf.d/10_periodic_verbose
    echo -e 'APT::Periodic::Update-Package-Lists "1";' | sudo tee /etc/apt/apt.conf.d/99_update-package-lists

    #echo -e 'APT::Periodic::Download-Upgradeable-Packages "0";' | sudo tee /etc/apt.conf.d/99_download-upgradeable-packages
    #echo -e 'APT::Periodic::AutocleanInterval "0";' | sudo tee /etc/apt.conf.d/99_autocleaninterval
    #echo -e 'APT::Periodic::Unattended-Upgrade "1";' | sudo tee /etc/apt.conf.d/99_unattended-upgrade
    #sudo apt-get install unattended-upgrades

    sudo apt update
    sudo apt install rpi-update
  2. EntropyWorks created this gist Apr 17, 2018.
    25 changes: 25 additions & 0 deletions update-pi.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    #!/bin/bash
    # https://blog.sleeplessbeastie.eu/2017/10/16/how-to-automatically-control-apt-cache/
    #
    sudo echo "Lets Go!"
    echo -e 'APT::Periodic::BackupArchiveInterval "7";\nAPT::Periodic::BackupLevel "3";\nDir::Cache::Backup "backup/";' | sudo tee /etc/apt/apt.conf.d/99_periodic_backup
    echo -e 'APT::Periodic::MaxAge "14";' | sudo tee /etc/apt/apt.conf.d/99_periodic_autoclean
    echo -e 'APT::Periodic::MaxSize "1024";\nAPT::Periodic::MinAge "2";' | sudo tee /etc/apt/apt.conf.d/99_periodic_autoclean
    echo -e 'APT::Periodic::AutocleanInterval "10";' | sudo tee /etc/apt/apt.conf.d/99_periodic_autoclean
    echo -e 'APT::Periodic::Verbose "1";' | sudo tee /etc/apt/apt.conf.d/10_periodic_verbose

    sudo apt update
    sudo apt install rpi-update
    sudo apt upgrade
    sudo apt dist-upgrade

    # For the odroid
    #
    #echo "When you install linux-image-xu3 package, you will meet"
    #echo "a dialog box and you have to choose No to proceed the"
    #echo "Kernel update."
    #echo "hit any key to continue"
    #read FOOBAR
    #unset FOOBAR
    # sudo apt install linux-image-xu3
    # sudo reboot