clean up for a pinebook live installer

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-04-24 14:21:23 -07:00
parent f0e87cc968
commit d1826be267
2 changed files with 18 additions and 18 deletions

View File

@ -17,7 +17,7 @@ func dhclient() {
shell.Run("systemctl stop wpa_supplicant.service")
shell.Run("killall wpa_supplicant")
go shell.Daemon("wpa_supplicant -D wext -i wlan0 -c /etc/wpa_supplicant.conf", 1000 * time.Millisecond)
go shell.Daemon("wpa_supplicant -d -g /tmp/wpa-wlan0.sock -D wext -i wlan0 -c /etc/wpa_supplicant.conf", 1000 * time.Millisecond)
log.Println("it for wpa_supplicant, then run dhclient")
@ -25,7 +25,7 @@ func dhclient() {
fmt.Println("running wpa_supplicant in the background")
fmt.Println("need to figure out how to talk to it to see it's status")
shell.Run("ifconfig wlan0")
time.Sleep(5000 * time.Millisecond)
time.Sleep(10000 * time.Millisecond) // every 10 seconds
filename := "/tmp/wit-install-done"
if _, err := os.Stat(filename); !os.IsNotExist(err) {
// log.Println("filename", filename, "does exist")
@ -57,5 +57,5 @@ func main() {
log.Println("MACHINE WIFI IS WORKING")
log.Println("MACHINE WIFI IS WORKING")
shell.Run("sleep 3600") // force it to bomb after 1 hour so I can debug what to do
shell.Run("sleep 360000") // force it to bomb after 1 hour so I can debug what to do
}

View File

@ -1,18 +1,18 @@
#!/bin/bash -x
#!/bin/bash
echo
echo
echo STARTING PINEBOOK IMAGING IN 5 SECONDS
echo STARTING PINEBOOK IMAGING IN 5 SECONDS
echo STARTING PINEBOOK IMAGING IN 5 SECONDS
echo STARTING PINEBOOK IMAGING IN 5 SECONDS
echo STARTING PINEBOOK IMAGING IN 5 SECONDS
echo
echo CONTROL-C TO STOP
echo
export SHELL=/bin/bash
export EDITOR=vim
export PWD=/root
export LOGNAME=root
export HOME=/root
export LANG=C
export USER=root
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin:/root/go/bin:/usr/games
export _=/usr/bin/env
sleep 5
cd /root
. /root/.bashrc
env
sleep 1
/root/go/bin/connect-to-wifi
touch /tmp/wit-installer-finished
startx