install stage 1: add sanity checks at the start
parent
8f2a786826
commit
64730980ea
|
@ -46,9 +46,17 @@ function run_in_target {
|
||||||
clear
|
clear
|
||||||
touch $LOGFILE
|
touch $LOGFILE
|
||||||
|
|
||||||
#TODO: check that we are root
|
if [ ! "$(id -u)" -eq 0 ]; then
|
||||||
#TODO: check that we are online
|
echo "Must be root to run this script!"
|
||||||
# -> could be done by pinging repo-default.voidlinux.org
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ping -c4 repo-default.voidlinux.org >> $LOGFILE 2>&1; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "An internet connection is required to run this script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
This script will now download and install Void Linux on your USB stick.
|
This script will now download and install Void Linux on your USB stick.
|
||||||
|
|
Loading…
Reference in New Issue