There seems no documentation about the execution order of substeps such as files, commands.
I have done some experiments, turns out that there are some rules existing in the internal implementation, I hope we can add the rules to the documentation.
==> /oem/91_custom.yml <==
name: "====test====1"
stages:
initramfs:
- name: "test step1"
files:
- path: /etc/file1
permissions: 644
owner: 0
group: 0
content: "file1"
commands:
- ls /etc/file1 2>&1 > /etc/cmd1.out
==> /oem/92_custom.yml <==
name: "====test====2"
stages:
initramfs:
- name: "test step1 of test2"
commands:
- ls /etc/file2 2>&1 > /etc/cmd2.out
files:
- path: /etc/file2
permissions: 644
owner: 0
group: 0
content: "file2"
==> /etc/cmd1.out <==
/etc/file1
==> /etc/cmd2.out <==
/etc/file2
Regardless of the order of files and commands, the files is always executed before commands.
So I am wondering, what is the rule?
There seems no documentation about the execution order of
substepssuch asfiles,commands.I have done some experiments, turns out that there are some rules existing in the internal implementation, I hope we can add the rules to the documentation.
Regardless of the order of
filesandcommands, thefilesis always executed beforecommands.So I am wondering, what is the rule?