Skip to content

Commit

Permalink
Add backwards-compatibility for liveCD detection
Browse files Browse the repository at this point in the history
This commit adds back the /run/cos/live_mode file if booting in
live-mode. /run/elemental/live_mode will exist side-by-side while
/run/cos is removed.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
  • Loading branch information
frelon committed Dec 13, 2023
1 parent 117e2c4 commit a7b7f2e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ name: "LiveCD Detection"
stages:
rootfs.before:
- if: |
cat /proc/cmdline | grep -q "CDLABEL" || cat /proc/cmdline | grep -q "elemental.disable"
cat /proc/cmdline | grep -q "CDLABEL" || cat /proc/cmdline | grep -q "elemental.disable" || cat /proc/cmdline | grep -q "rd.cos.disable"
name: "Identify live mode"
files:
- path: /run/elemental/live_mode
content: "1"
permissions: 0600
owner: 0
group: 0
- path: /run/cos/live_mode
content: "1"
permissions: 0600
owner: 0
group: 0
- if: '[ -f "/run/elemental/live_mode" ]'
name: "Include cloud init files from the ISO root"
files:
Expand Down

0 comments on commit a7b7f2e

Please sign in to comment.