Installer disables network service, fix in rbuild (dev only)

This commit is contained in:
MaMe82 2018-08-01 13:11:11 +02:00
parent 2ec7b0d2e4
commit d061348087
3 changed files with 61 additions and 2 deletions

View File

@ -71,6 +71,7 @@ install:
# careful testing
#sudo update-rc.d dhcpcd disable
#sudo update-rc.d dnsmasq disable
systemctl disable networking.service # disable network service, relevant parts are wrapped by P4wnP1 (boottime below 20 seconds)
# reinit service daemon
systemctl daemon-reload

View File

@ -1,9 +1,10 @@
#!/bin/bash
env GOBIN=$(pwd)/build GOOS=linux GOARCH=arm go install ./... # compile all main packages to the build folder
#env GOBIN=$(pwd)/build GOOS=linux GOARCH=arm go install cmd/... # compile all main packages to the build folder
env GOOS=linux GOARCH=arm go build -o build/P4wnP1_service cmd/P4wnP1_service/P4wnP1_service.go
env GOOS=linux GOARCH=arm go build -o build/P4wnP1_cli cmd/P4wnP1_cli/P4wnP1_cli.go
scp build/P4wnP1_service pi@raspberrypi.local:~/P4wnP1_go
scp build/P4wnP1_cli pi@raspberrypi.local:~/P4wnP1_go
#env GOOS=linux GOARCH=arm go build P4wnP1_service.go
#scp P4wnP1_service pi@raspberrypi.local:~/P4wnP1_go
#env GOOS=linux GOARCH=arm go build P4wnP1_cli.go
#scp P4wnP1_cli pi@raspberrypi.local:~/P4wnP1_go

View File

@ -0,0 +1,57 @@
// +build js
package main
import (
"github.com/gopherjs/gopherjs/js"
"github.com/mame82/hvue"
)
type CompEthernetAddressesData2 struct {
*js.Object
}
func newCompEthernetAddressesData2(vm *hvue.VM) interface{} {
cc := &CompEthernetAddressesData2{
Object: js.Global.Get("Object").New(),
}
return cc
}
func InitCompEthernetAddresses2() {
/*
o := vue.NewOption()
o.Name = "EthernetAddresses"
o.SetDataWithMethods(newCompEthernetAddressesData2)
o.Template = compEthernetAddressesTemplate2
o.AddProp("settings")
*/
hvue.NewComponent(
"ethernet-addresses",
hvue.Template(compEthernetAddressesTemplate2),
hvue.DataFunc(newCompEthernetAddressesData2),
hvue.PropObj("settings", hvue.Types(hvue.PObject)),
)
}
const (
compEthernetAddressesTemplate2 = `
<div>
<table>
<tr>
<td>Host MAC address</td><td><input v-bind:value="settings.HostAddr" v-on:input="$emit('hostAddrChange', $event.target.value)"></td>
</tr>
<tr>
<td>Device MAC address</td><td><input v-bind:value="settings.DevAddr" v-on:input="$emit('devAddrChange', $event.target.value)"></td>
</tr>
</table>
</div>
`
)