Skip to content

Commit

Permalink
explicitly mount and unmount /var for os files handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jdob committed Oct 30, 2024
1 parent 2616422 commit 0b180eb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

## Bug Fixes

* [#593](https://github.com/suse-edge/edge-image-builder/issues/593) - OS files script should mount /var
* [#594](https://github.com/suse-edge/edge-image-builder/issues/594) - Package install breaks package resolution if packages is already installed on root OS

---
Expand Down
2 changes: 2 additions & 0 deletions pkg/combustion/osfiles_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ func TestConfigureOSFiles(t *testing.T) {
expectedCombustionScript := filepath.Join(ctx.CombustionDir, osFilesScriptName)
contents, err := os.ReadFile(expectedCombustionScript)
require.NoError(t, err)
assert.Contains(t, string(contents), "mount /var")
assert.Contains(t, string(contents), "cp -R")
assert.Contains(t, string(contents), "umount /var")

// -- Files
expectedFile := filepath.Join(ctx.CombustionDir, osFilesConfigDir, "etc", "ssh", "test-config-file")
Expand Down
2 changes: 2 additions & 0 deletions pkg/combustion/templates/19-copy-os-files.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
set -euo pipefail

mount /var
cp -R ./os-files/* /
umount /var

0 comments on commit 0b180eb

Please sign in to comment.