Skip to content
Snippets Groups Projects
Commit f24c1f6f authored by Bob Mottram's avatar Bob Mottram
Browse files

Check if running as root

parent 53b9be14
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,14 @@ CHECK_MESSAGE="Check your internet connection, /etc/network/interfaces and /etc/
# Default diffie-hellman key length in bits
DH_KEYLENGTH=2048
function running_as_root {
if [[ $EUID != 0 ]] ; then
echo "0"
else
echo "1"
fi
}
function initial_setup {
if [[ $(is_completed $FUNCNAME) == "1" ]]; then
return
......
......@@ -40,6 +40,10 @@ WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg
ATHEROS_WIFI_REPO="https://github.com/qca/open-ath9k-htc-firmware.git"
function setup_wifi_atheros {
if [[ $(running_as_root) == "0" ]]; then
return
fi
atheros_drivers_file=drivers/ath9k_htc_driver_bbb.tar.gz
if [ ! -f $atheros_drivers_file ]; then
if [ ! -f ~/freedombone/$atheros_drivers_file ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment