clean up for a pinebook live installer
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
f0e87cc968
commit
d1826be267
|
@ -17,7 +17,7 @@ func dhclient() {
|
||||||
shell.Run("systemctl stop wpa_supplicant.service")
|
shell.Run("systemctl stop wpa_supplicant.service")
|
||||||
shell.Run("killall wpa_supplicant")
|
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")
|
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("running wpa_supplicant in the background")
|
||||||
fmt.Println("need to figure out how to talk to it to see it's status")
|
fmt.Println("need to figure out how to talk to it to see it's status")
|
||||||
shell.Run("ifconfig wlan0")
|
shell.Run("ifconfig wlan0")
|
||||||
time.Sleep(5000 * time.Millisecond)
|
time.Sleep(10000 * time.Millisecond) // every 10 seconds
|
||||||
filename := "/tmp/wit-install-done"
|
filename := "/tmp/wit-install-done"
|
||||||
if _, err := os.Stat(filename); !os.IsNotExist(err) {
|
if _, err := os.Stat(filename); !os.IsNotExist(err) {
|
||||||
// log.Println("filename", filename, "does exist")
|
// log.Println("filename", filename, "does exist")
|
||||||
|
@ -57,5 +57,5 @@ func main() {
|
||||||
log.Println("MACHINE WIFI IS WORKING")
|
log.Println("MACHINE WIFI IS WORKING")
|
||||||
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
|
||||||
}
|
}
|
||||||
|
|
30
rc.local
30
rc.local
|
@ -1,18 +1,18 @@
|
||||||
#!/bin/bash -x
|
#!/bin/bash
|
||||||
|
|
||||||
echo
|
export SHELL=/bin/bash
|
||||||
echo
|
export EDITOR=vim
|
||||||
echo STARTING PINEBOOK IMAGING IN 5 SECONDS
|
export PWD=/root
|
||||||
echo STARTING PINEBOOK IMAGING IN 5 SECONDS
|
export LOGNAME=root
|
||||||
echo STARTING PINEBOOK IMAGING IN 5 SECONDS
|
export HOME=/root
|
||||||
echo STARTING PINEBOOK IMAGING IN 5 SECONDS
|
export LANG=C
|
||||||
echo STARTING PINEBOOK IMAGING IN 5 SECONDS
|
export USER=root
|
||||||
echo
|
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin:/root/go/bin:/usr/games
|
||||||
echo CONTROL-C TO STOP
|
export _=/usr/bin/env
|
||||||
echo
|
|
||||||
|
|
||||||
sleep 5
|
cd /root
|
||||||
|
. /root/.bashrc
|
||||||
|
env
|
||||||
|
sleep 1
|
||||||
|
|
||||||
/root/go/bin/connect-to-wifi
|
startx
|
||||||
|
|
||||||
touch /tmp/wit-installer-finished
|
|
||||||
|
|
Loading…
Reference in New Issue