Skip to content

Commit

Permalink
🐛 Do not run kcrypt hook without a oem mount (kairos-io#368)
Browse files Browse the repository at this point in the history
Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>

Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
  • Loading branch information
mudler authored Nov 3, 2022
1 parent 7e9f69f commit f495946
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion overlay/files/system/oem/21_kcrypt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ name: "Update discovery plugins"
stages:
after-upgrade:
- name: "Update plugins"
if: "[ $(kairos-agent state get oem.found) == 'true' ]"
commands:
- |
STATEDIR=/tmp/mnt/OEM
OEM=$(blkid -L COS_OEM || true)
OEM=$(kairos-agent state get oem.name)
mkdir -p $STATEDIR || true
mount ${OEM} $STATEDIR
if [ -d "$STATEDIR/system/discovery" ]; then
Expand Down
1 change: 1 addition & 0 deletions tests/autoinstall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ var _ = Describe("kairos autoinstall test", Label("autoinstall-test"), func() {
stateAssert("state.type", "ext4")
stateAssert("oem.mount_point", "/oem")
stateAssert("persistent.mount_point", "/usr/local")
stateAssert("persistent.name", "/dev/vda")
stateAssert("state.mount_point", "/run/initramfs/cos-state")
stateAssert("oem.read_only", "false")
stateAssert("persistent.read_only", "false")
Expand Down

0 comments on commit f495946

Please sign in to comment.