mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-16 14:01:04 +00:00
revert: undo 4 racing/reconcile fix commits
This commit is contained in:
parent
637036b8c8
commit
0e5e989192
5 changed files with 29 additions and 35 deletions
|
|
@ -141,21 +141,3 @@ func writeConfigFile(chrootRootDir string, spec MachineSpec, paths machinePaths,
|
|||
|
||||
return "/vm_config.json", nil
|
||||
}
|
||||
|
||||
func writeMetadataFile(chrootRootDir string, spec MachineSpec) (string, error) {
|
||||
if spec.MMDS == nil || spec.MMDS.Data == nil {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
data, err := json.Marshal(spec.MMDS.Data)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("marshal mmds data: %w", err)
|
||||
}
|
||||
|
||||
metadataPath := filepath.Join(chrootRootDir, "mmds.json")
|
||||
if err := os.WriteFile(metadataPath, data, 0o644); err != nil {
|
||||
return "", fmt.Errorf("write mmds data: %w", err)
|
||||
}
|
||||
|
||||
return "/mmds.json", nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue