Closed MariaMayang closed 9 months ago
@MariaMayang Can you please provide the output of what was added to your file?
@lauramosher The /etc/hosts
file had a single line of commented text, with 127.0.0.0 terrastories.local and comments all smushed together, and \n
separating them, but not parsed as a paragraph.
Operating system: Manjaro Linux (Arch)
142 cd offline-field-kit-main/ 143 ls 144 chmod +x install.sh 145 chmod +x install.sh 146 ls 147 bash install.sh 148 docker rm -f $(docker ps -aq) 149 bash install.sh 150 cat /etc/hosts~ 151 cat /etc/hosts 152 sudo vim /etc/hosts 153 sudo pacman -S vim 154 sudo vim /etc/hosts 155 cp docker/local/.env.example docker/local/.env
I was not able to reproduce in Ubuntu 22.04.
@rudokemper the /etc/hosts
file looks good on Ubuntu?
Yes
# End of section
# Added by Terrastories
127.0.0.1 terrastories.local
# End of section
Interesting, why would Arch parse it differently...
What version of sh and bash does Manjaro use?
@luandro Does this work for you?
sudo -- bash -c "echo -e '# Added by Terrastories\n127.0.0.1 terrastories.local\n# End of section' >> /etc/hosts"
What version of sh and bash does Manjaro use?
GNU bash, versão 5.2.21(1)-release (x86_64-pc-linux-gnu)
& zsh 5.9 (x86_64-pc-linux-gnu)
If you run this on its own, does it work?
echo '# Added by Terrastories\n127.0.0.1 terrastories.local\n# End of section' >> /etc/hosts
This doesnt get parsed correctly.
@luandro Does this work for you?
sudo -- bash -c "echo -e '# Added by Terrastories\n127.0.0.1 terrastories.local\n# End of section' >> /etc/hosts"
This does!
@luandro Great. I've updated the script to use the new command.
Semi-related, the script does not need to made an executable with chmod +x
since we are invoking the file with bash
. Just noticed that in the lines @MariaMayang posted.
the install.sh script isnt correctly adding host value, as "\n" arent being parsed as paragraphs