mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-12-23 21:14:41 +00:00
Compare commits
2 Commits
v0.4.0-alp
...
v0.4.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57e5a710e0 | ||
|
|
062d95c1eb |
@@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
## [0.4.0 - alpha]
|
## [0.4.0] - 2022-12-13
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- [Developer] Included `casaos-cli` command tool for debugging
|
- [Developer] Included `casaos-cli` command tool for debugging
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
net2 "net"
|
net2 "net"
|
||||||
@@ -63,8 +64,15 @@ func (c *systemService) GetMacAddress() (string, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
inter := interfaces[0]
|
nets := MyService.System().GetNet(true)
|
||||||
return inter.HardwareAddr, nil
|
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) {
|
func (c *systemService) MkdirAll(path string) (int, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user