
The fde-setup-request command is used inside the fde-setup hook. It will

return information about what operation for full-disk encryption is

requested and auxiliary data to complete this operation.

The fde-setup hook should do what is requested and then call

"snapctl fde-setup-result" and pass the result data to stdin.

Here is an example for how the fde-setup hook is called initially:

$ snapctl fde-setup-request

{"op":"features"}

$ echo '{"features": []}' | snapctl fde-setup-result

Alternatively the hook could reply with:

$ echo '{"error":"hardware-unsupported"}' | snapctl fde-setup-result

And then it is called again with a request to do the initial key setup:

$ snapctl fde-setup-request

{"op":"initial-setup", "key": "key-to-seal"}

$ echo "{"sealed-key":"$base64_encoded_sealed_key"}" | snapctl fde-setup-result