#!/bin/sh
# ejp/imagination/20.12.2012: install-eth-drivers.sh
# Build the ethernet drivers for Atheros AR8161,
# install them, bring the interface up and get
# an IP address.
set -e
# Get the password before the user gets a cup of tea
sudo echo ""
cd /home/user/compat-wireless-2012-03-12-p
# Clean up any existing builds
make clean
./scripts/driver-select alx
# Build it
make -j 4
# Install it
sudo make install
sudo ./scripts/alx-enable atl1c
sudo ./scripts/alx-enable alx
# Activate it
sudo modprobe alx
# Bring the interface up
sudo ifconfig eth0 up
# Get an IP
sudo dhclient eth0