Skip to content
This repository was archived by the owner on Apr 3, 2025. It is now read-only.

Commit eebf3d4

Browse files
mouadinotonivdv
authored andcommitted
Use printf in favor of echo for reproducibility (#83)
In my machine, echo will lead to literally having \n in /etc/exports file which will lead the nfs server to fail starting, this is due to the echo version that I have locally, while printf doesn't have this issue as explained here: https://stackoverflow.com/questions/8467424/echo-newline-in-bash-prints-literal-n
1 parent 93eab32 commit eebf3d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker-machine-nfs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ configureNFS()
360360
# Write new exports block ending
361361
exports="${exports}${exports_end}"
362362
#Export to file
363-
echo "$exports" | sudo tee /etc/exports >/dev/null
363+
printf "$exports" | sudo tee /etc/exports >/dev/null
364364

365365
sudo nfsd restart ; sleep 2 && sudo nfsd checkexports
366366

0 commit comments

Comments
 (0)