hostman: fsdriver: fix hostname deployment for openwrt

We will need to add native uci support later
This commit is contained in:
Yousong Zhou
2019-12-25 15:45:20 +08:00
parent f01a125db5
commit 5303efe96d
+3
View File
@@ -1367,6 +1367,9 @@ func (d *SOpenWrtRootFs) RootSignatures() []string {
func (d *SOpenWrtRootFs) DeployHostname(rootFs IDiskPartition, hn, domain string) error {
spath := "/etc/config/system"
if !rootFs.Exists(spath, false) {
return nil
}
bcont, err := rootFs.FileGetContents(spath, false)
if err != nil {
return err