feat: added network check to fresh

master
Toerd@archlinux 5 years ago
parent 7eb4fef9b6
commit 37576d8bd3

@ -31,7 +31,16 @@ startup_msg() {
echo "Script started - Platform is: $curr_platform\n\n" >> $logfile
}
wait_for_network() {
dialog --infobox "Waiting for internet connection...\n\nDumdidum dum dumdiii dum" 0 0
dhcpcd >> $logfile
while [ ! $OK = 0 ]; do
ping -c 1 -q "one.one.one.one" >> $logfile && OK=$?
done
}
init() {
wait_for_network
pacman -S --noconfirm --needed dialog git make || { echo "Run as root user"; exit; }
refresh_keyring
}

Loading…
Cancel
Save