vmware / photon-os-installer

Photon OS Installer
Other
12 stars 18 forks source link

postinstall script executed in arbitrary order. #13

Closed terefang closed 1 year ago

terefang commented 2 years ago

Describe the bug

kickstarter postinstall scripts are executed in arbitrary order.

python os.listdir is used which returns filenames in arbitrary order.

see https://www.tutorialspoint.com/python/os_listdir.htm

Reproduction steps

package postinstall scripts like

    "search_path": [ "/mnt/media" ],
    "postinstallscripts": [
        "scripts/10-enable-sshd.sh",
        "scripts/50-test.sh",
        "scripts/99-sleep.sh"
    ],


### Expected behavior

scripts should either be executed in given order or sorted (better)

### Additional context

_No response_
gpiyush-dev commented 1 year ago

Resolved with https://github.com/vmware/photon-os-installer/commit/b878ef28966274e52b9b2ef538190656ce7782a8