add more codes
This commit is contained in:
@@ -101,7 +101,10 @@ func renderConfig(spec Spec) (string, error) {
|
||||
fmt.Fprintf(buf, "lxc.idmap = u 0 %d %d\n", uidStart, count)
|
||||
fmt.Fprintf(buf, "lxc.idmap = g 0 %d %d\n", uidStart, count)
|
||||
}
|
||||
rootfs := fmt.Sprintf("/var/lib/lxc/%s/rootfs", spec.Name)
|
||||
rootfs := spec.RootfsPath
|
||||
if rootfs == "" {
|
||||
rootfs = fmt.Sprintf("/var/lib/lxc/%s/rootfs", spec.Name)
|
||||
}
|
||||
fmt.Fprintf(buf, "lxc.rootfs.path = dir:%s\n", rootfs)
|
||||
for idx, nic := range spec.NICs {
|
||||
fmt.Fprintf(buf, "lxc.net.%d.type = veth\n", idx)
|
||||
|
||||
Reference in New Issue
Block a user