Raspbian Debian Software Updates: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
No edit summary
Line 41: Line 41:
</pre>
</pre>


= raspbian Firmware =
= Raspbian Firmware =
This script already exists
This script already exists
<pre>
<pre>
sudo rpi-update
sudo rpi-update
</pre>
== Installing ==
On the lite version of Raspbian this scrip is not pre installed.
<pre>
apt-get install rpi-update
</pre>
</pre>



Revision as of 04:52, 23 January 2016

Create a script to update the operating system.

sudo vi /usr/sbin/update

add the following contents to file

#!/bin/bash

if [[ ${EUID} -ne 0 ]]; then
        echo " !!! This tool must be run as root"
        exit 1
fi

apt-get update
apt-get -y upgrade
apt-get -y dist-upgrade
apt-get -y autoclean

echo
echo
echo Updates Completed
echo

read -p "Would you like to reboot? (y/N)" -n 1 -r -s
        echo ""
        if ! [[ $REPLY =~ ^[Yy]$ ]]; then
                exit 1;
        fi

reboot

make file executable

sudo chmod +x /usr/sbin/update

execute script

sudo update

Raspbian Firmware

This script already exists

sudo rpi-update

Installing

On the lite version of Raspbian this scrip is not pre installed.

apt-get install rpi-update

debian mirrors

Make sure you check out the package mirrors