docs: fix init-hoot script for hostname matching (#1182)

The init-hook provided for creating a distrobox with the
the same hostname as its host has two typos:

- Command substitution wrapping `uname -n` suppressing stdout redirect
- trailing "`"

Using this init-hook as suggested causes build errors.
This fix corrects the suggested script by echoing the command
substitution and removing the trailing "`".

See issue #1164 for details.
This commit is contained in:
Michael Haaf
2024-02-15 10:30:34 -05:00
committed by GitHub
parent e9bf2663dd
commit 0a9f8aa8bc

View File

@@ -222,7 +222,7 @@ creating it with the following init-hook:
```sh
distrobox create --name test --image your-chosen-image:tag \
--init-hooks '"$(uname -n)" > /etc/hostname'`
--init-hooks 'echo "$(uname -n)" > /etc/hostname'
```
This will ensure SSH X-Forwarding will work when SSH-ing inside the distrobox: