I have done something similar to toggle things in the plist. (RequestVarRouting, VMM, GOP)
But I noticed that plutil sadly does not keep the plists key order. (probably sorts them alphabetically)
Do you think that might be a problem? (I guess not, but not sure)
Btw if such commands are kept simple and low-level
you can add them to /Volumes/EFI to be able to use them from recovery as well (eg. /Volumes/EFI/ocToggle)
also copying /usr/bin/nano to Volumes/EFI works fine to do manual edits from recovery
I had no problems so far with those commands being there.
plutil and plist buddy each appear to have pros and cons. Plutil is better for creating the hex data entries. Plist buddy is better for creating dict entries.
the key ordering you are taking about is not really important. I assume you mean, for example, the keys within a dict.
EDIT: I think the ordering could be more important perhaps in some cases for some arrays.
for day to day admin I think it makes more sense to keep a couple of premade config.plist in your efi that you can swap in and out rather then dynamically editing but I like to keep things simple
Last edited: