parent
ea3259d67d
commit
64c18f134e
|
@ -23,12 +23,22 @@ func dhclient() {
|
||||||
|
|
||||||
for {
|
for {
|
||||||
log.Println("need to check the status of wpa_supplicant and dhclient here")
|
log.Println("need to check the status of wpa_supplicant and dhclient here")
|
||||||
time.Sleep(5000 * time.Millisecond) // check every few seconds
|
time.Sleep(1000 * time.Millisecond)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
parseConfig()
|
parseConfig()
|
||||||
|
|
||||||
dhclient()
|
go dhclient()
|
||||||
|
|
||||||
|
for {
|
||||||
|
time.Sleep(1000 * time.Millisecond)
|
||||||
|
ping := shell.Run("ping -c 1 localhost")
|
||||||
|
log.Println("ping returned ", ping)
|
||||||
|
if (ping == 0) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
shell.Run("/root/go/bin/get-image")
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import "os"
|
||||||
|
import "log"
|
||||||
|
|
||||||
|
import "git.wit.com/jcarr/shell"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
shell.Run("dialog --ascii-lines --msgbox 'Flash_Image_Completed' 10 70")
|
||||||
|
|
||||||
|
log.Println("INSTALL SUCCEEDED")
|
||||||
|
log.Println("INSTALL SUCCEEDED")
|
||||||
|
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
Binary file not shown.
Loading…
Reference in New Issue