fixing lock issue
This commit is contained in:
1 parent
22fd8fbce8
commit
7f58254dbc
1 file changed
+5
-2
@@ -162,8 +162,11 @@ func (l *Local) Start(ctx context.Context, spec node.StartSpec) error {
|
||||
if err := os.RemoveAll(root); err != nil {
|
||||
return fmt.Errorf("clearing old container files: %w", err)
|
||||
}
|
||||
if err := os.MkdirAll(filepath.Join(root, "etc"), 0o755); err != nil {
|
||||
return err
|
||||
// systemd-nspawn refuses a directory without /usr as not an OS tree.
|
||||
for _, dir := range []string{"etc", "usr"} {
|
||||
if err := os.MkdirAll(filepath.Join(root, dir), 0o755); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if f, err := os.OpenFile(filepath.Join(root, "etc/os-release"), os.O_CREATE, 0o644); err == nil {
|
||||
f.Close()
|
||||
|
||||
Reference in new issue
Block a user