![](/@@/translation-newline)
The fde-setup-request command is used inside the fde-setup hook. It will
![](/@@/translation-newline)
return information about what operation for full-disk encryption is
![](/@@/translation-newline)
requested and auxiliary data to complete this operation.
![](/@@/translation-newline)
The fde-setup hook should do what is requested and then call
![](/@@/translation-newline)
"snapctl fde-setup-result" and pass the result data to stdin.
![](/@@/translation-newline)
Here is an example for how the fde-setup hook is called initially:
![](/@@/translation-newline)
$ snapctl fde-setup-request
![](/@@/translation-newline)
{"op":"features"}
![](/@@/translation-newline)
$ echo '[]' | snapctl fde-setup-result
![](/@@/translation-newline)
Alternatively the hook could reply with:
![](/@@/translation-newline)
$ echo '{"error":"hardware-unsupported"}' | snapctl fde-setup-result
![](/@@/translation-newline)
And then it is called again with a request to do the initial key setup:
![](/@@/translation-newline)
$ snapctl fde-setup-request
![](/@@/translation-newline)
{"op":"initial-setup", "key": "key-to-seal", "key-name":"key-for-ubuntu-data"}
![](/@@/translation-newline)
$ echo "$sealed_key" | snapctl fde-setup-result