Check if running as root
This commit is contained in:
parent
53b9be1418
commit
f24c1f6f2d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue