# Default Elemental OEM configuration file
#
# This file is part of Elemental and will get reset during upgrades.
#
# Before you change this file manually,
# consider copying this file to /usr/local/cloud-config or
# copy the file with a prefix starting by 90, e.g. /oem/91_custom.yaml
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 "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:
       - path: /etc/elemental/config.d/iso-cloud-init-paths.yaml
         content: |
                  cloud-init-paths:
                    - "/run/initramfs/live/iso-oem"
         permissions: 0644
         owner: 0
         group: 0
