58 lines
1.2 KiB
Bash
58 lines
1.2 KiB
Bash
#!/bin/bash
|
|
clear
|
|
#[[ $(fgconsole 2>/dev/null) == 1 ]] #depre
|
|
|
|
## Replace Python smlink for tbrowser shutdown button
|
|
rm /usr/bin/python
|
|
ln -s /usr/bin/python2 /usr/bin/python
|
|
|
|
#########################################
|
|
##
|
|
## Pulseaudio+dbus abomination taming
|
|
##
|
|
## add pulseaudio users, maybe useless
|
|
## extra file in /etc/dbus-1/system.d/pulseaudio.conf
|
|
##
|
|
#########################################
|
|
|
|
useradd -r -d /var/run/pulse pulse 2> /dev/null
|
|
groupadd -r pulse 2> /dev/null
|
|
gpasswd -a pulse pulse 1> /dev/null
|
|
gpasswd -a root pulse 1> /dev/null
|
|
## start pulseaudio deamon
|
|
pulseaudio -D 2> /dev/null
|
|
## Max volume enforced
|
|
amixer sset Master 100% 1>/dev/null
|
|
|
|
## Test for Internet
|
|
i=0
|
|
c=0
|
|
echo " "
|
|
while [ $i -lt 1 ]; do
|
|
while [ $c -lt 7 ]; do
|
|
wget -q --spider http://google.com
|
|
if [ $? -eq 0 ]; then
|
|
i=1
|
|
exec xinit -- vt1 &> /dev/null
|
|
#xinit
|
|
exit
|
|
else
|
|
c=$((c + 1))
|
|
echo -ne "Testing internet connection, timeout on '$c' / 7 tries...\r"
|
|
fi
|
|
sleep 2
|
|
done
|
|
echo "Timeout after 7 tries - no internet."
|
|
echo "Starting WiFi-Menu..."
|
|
rm /etc/netctl/* 2>&1 >/dev/null
|
|
wifi-menu
|
|
echo "Trying again..."
|
|
c=0
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
exit
|