Provide a script for macOS to generate the secure key (#3867)

Without including the LC_CTYPE=C environment variable on macOS, tr returns a "Illegal byte sequence" error.
This commit is contained in:
Ryan Sandridge 2017-11-02 03:32:25 -04:00 committed by Fabian Affolter
parent 6881f35e21
commit c13673dc8b

View File

@ -28,6 +28,11 @@ An easy script to generate a random key:
cat /dev/urandom | tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g' -e 's/, $//'
```
On macOS, this script will generate a random key:
```bash
cat /dev/urandom | LC_CTYPE=C tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g' -e 's/, $//'
```
<p class='note warning'>
Ensure you keep a backup of this key. If you have to rebuild your system and don't have a backup of this key, you won't be able to reconnect to any security devices. This may mean you have to do a factory reset on those devices, and your controller, before rebuilding your Z-Wave network.
</p>