You've already forked CasaOS
mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-07-15 23:54:17 +02:00
done (#750)
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
net2 "net"
|
||||
@ -63,8 +64,15 @@ func (c *systemService) GetMacAddress() (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
inter := interfaces[0]
|
||||
return inter.HardwareAddr, nil
|
||||
nets := MyService.System().GetNet(true)
|
||||
for _, v := range interfaces {
|
||||
for _, n := range nets {
|
||||
if v.Name == n {
|
||||
return v.HardwareAddr, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return "", errors.New("not found")
|
||||
}
|
||||
|
||||
func (c *systemService) MkdirAll(path string) (int, error) {
|
||||
|
Reference in New Issue
Block a user