#!/bin/bash

		if [ `whoami` != "root" ]; then
			echo "You must run this as root."
			echo "sudo $0"
			exit 0
		fi

echo "Keeping ODROBIAN up-to-date with latest software & fixes.."
sleep 2
echo

apt-get update -y && apt-get upgrade -y
apt-get autoremove -y

if dpkg --get-selections | grep -q "^chromium-browser[[:space:]]*install$" >/dev/null; then
    echo
    echo "Installing repository version of Chromium Browser!"
    sleep 2
    apt-get install chromium-browser-odrobian -y
fi

if [ -f /etc/udev/rules.d/70-persistent-net.rules ]; then
    echo
    echo "Fixing Ethernet interface being recognized as 'eth1' instead of 'eth0'"
    sleep 2
rm /etc/udev/rules.d/70-persistent-net.rules
udevadm control --reload-rules
echo "Success!"
echo
echo "You might want to reboot your ODROID to take effect."
sleep 2
echo "Try 'sudo reboot'"
fi
