Fix MOK enrollment failure: hardcoded shebang and shell parameter passing #147
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
MOK enrollment tasks failed with
ModuleNotFoundError: No module named 'fabric'when invoked viaphoenixboot-wizard.shor directly. Root causes:#!/home/punk/.venv/bin/python(user-specific venv path)bash -lc 'script.sh "$VAR"'expanded variables in subshell but scripts expected positional parameters$1,$2,$3Changes
#!/usr/bin/env python3for portabilityos-mok-enroll,secure-mok-newsecure-mok-verify,secure-enroll-mok,secure-mok-enroll-new,secure-unenroll-mok,secure-der-extractBefore:
shell bash -lc 'scripts/mok-management/enroll-mok.sh "${VAR1}" "${VAR2}" ${VAR3}'After:
How This Was Tested
Verified all MOK tasks execute and reach target scripts with correct parameters:
./pf.py os-mok-enroll- Reaches UEFI firmware check./pf.py secure-mok-new- Generates keys successfully./pf.py list- Shows all tasks correctlyphoenixboot-wizard.sh- Advanced menu option 3 (Enroll MOK) executesIntegration Instructions
N/A - Bug fix with no integration requirements.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.