docs(ja): Fix correct the sed command while set the hostname

pull/805/head
kahirokunn 2024-08-22 10:06:00 +09:00
parent 3001d8f574
commit 2df174d22d
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ aarch64 GNU/Linux
```bash ```bash
while read IP FQDN HOST SUBNET; do while read IP FQDN HOST SUBNET; do
CMD="sed -i 's/^127.0.1.1.*/127.0.1.1\t${FQDN} ${HOST}/' /etc/hosts" CMD="sed -i 's/^127.0.0.1.*/127.0.0.1\t${FQDN} ${HOST}/' /etc/hosts"
ssh -n root@${IP} "$CMD" ssh -n root@${IP} "$CMD"
ssh -n root@${IP} hostnamectl hostname ${HOST} ssh -n root@${IP} hostnamectl hostname ${HOST}
done < machines.txt done < machines.txt