mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(host-deployer): check /etc/network dir is esixt (#15314)
This commit is contained in:
@@ -758,6 +758,13 @@ func (d *sDebianLikeRootFs) DeployNetworkingScripts(rootFs IDiskPartition, nics
|
||||
if err := d.sLinuxRootFs.DeployNetworkingScripts(rootFs, nics); err != nil {
|
||||
return err
|
||||
}
|
||||
if !rootFs.Exists("/etc/network", false) {
|
||||
if err := rootFs.Mkdir("/etc/network",
|
||||
syscall.S_IRUSR|syscall.S_IWUSR|syscall.S_IXUSR, false); err != nil {
|
||||
return errors.Wrap(err, "mkdir /etc/network")
|
||||
}
|
||||
}
|
||||
|
||||
fn := "/etc/network/interfaces"
|
||||
var cmds strings.Builder
|
||||
cmds.WriteString("auto lo\n")
|
||||
|
||||
Reference in New Issue
Block a user