https://github.com/duckietown/Software
Raw File
Tip revision: b3ef04c058de2f1faa4d05260d0d4d1ecdd7e152 authored by Hang Zhao on 09 March 2016, 19:19:49 UTC
Merge pull request #58 from duckietown/M04_PAI-teddy
Tip revision: b3ef04c
fix_wifi.sh
#!/usr/bin/env bash
# installs fix from https://launchpad.net/ubuntu/+source/ifupdown/0.7.47.2ubuntu4.4
# setting up proposed repo comes https://wiki.ubuntu.com/Testing/EnableProposed

set -e

if grep -q "$(lsb_release -sc)-proposed" /etc/apt/sources.list
then
    echo "you already got trusty-proposed repos enabled!"
else
    echo "adding trusty-proposed!"
    sudo sh -c 'echo "deb http://ports.ubuntu.com $(lsb_release -sc)-proposed restricted main multiverse universe" > /etc/apt/sources.list'
fi

if [ -f /etc/apt/preferences.d/proposed-updates ];
then
    echo "you already have a preference file in place!"
else
    sudo sh -c $'echo "Package: *\nPin: release a=trusty-proposed\nPin-Priority: 400\n" >  /etc/apt/preferences.d/proposed-updates'
fi

sudo apt-get update
sudo apt-get install ifupdown/trusty-proposed

echo 'please reboot your duckie!'
back to top