Run reset on uki autoreset (#762)

This commit is contained in:
Itxaka
2024-03-22 13:11:06 +01:00
committed by GitHub
parent 776dbb1fc0
commit eb3c308b5d
3 changed files with 6 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
packages: packages:
- name: "kairos-overlay-files" - name: "kairos-overlay-files"
category: "static" category: "static"
version: "1.1.31" version: "1.1.32"

View File

@@ -8,7 +8,7 @@
name: "Rootfs Layout Settings for UKI" name: "Rootfs Layout Settings for UKI"
stages: stages:
rootfs: rootfs:
- if: '[ -e "/run/cos/uki_boot_mode" ] && [ ! -e "/run/cos/recovery_mode" ]' - if: '[ -e "/run/cos/uki_boot_mode" ] && [ ! -e "/run/cos/recovery_mode" ] && [ ! -e "/run/cos/autoreset_mode" ]'
name: "Layout configuration for UKI boot" name: "Layout configuration for UKI boot"
environment_file: /run/cos/cos-layout.env environment_file: /run/cos/cos-layout.env
environment: environment:
@@ -46,9 +46,9 @@ stages:
/var/lib/wicked /var/lib/wicked
/var/log /var/log
/var/snap /var/snap
- if: '[ -e "/run/cos/uki_boot_mode" ] && [ -e "/run/cos/recovery_mode" ]' - if: '[ -e "/run/cos/uki_boot_mode" ] && ([ -e "/run/cos/recovery_mode" ] || [ -e "/run/cos/autoreset_mode" ])'
# omit the persistent partition on recovery mode # omit the persistent partition on recovery mode/autoreset
name: "Layout configuration for recovery mode on UKI" name: "Layout configuration for recovery/autoreset mode on UKI"
environment_file: /run/cos/cos-layout.env environment_file: /run/cos/cos-layout.env
environment: environment:
OVERLAY: "tmpfs:25%" OVERLAY: "tmpfs:25%"

View File

@@ -3,7 +3,7 @@ stages:
initramfs: initramfs:
- name: "Starts kairos-reset for systemd based systems" - name: "Starts kairos-reset for systemd based systems"
if: | if: |
grep -q "kairos.reset" /proc/cmdline && \ (grep -q "kairos.reset" /proc/cmdline || [ -f /run/cos/autoreset_mode ]) && \
( [ -e "/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] || [ -e "/usr/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] ) ( [ -e "/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] || [ -e "/usr/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] )
commands: commands:
- systemctl disable getty@tty1 - systemctl disable getty@tty1