Skip to content

Commit 8008994

Browse files
committed
Add sed g option to change all instances of hostname
For example 127.0.1.1 my_host.my_domain.com my_host should be changed by rpi-clone-setup test_host to: 127.0.1.1 test_host.my_domain.com test_host and not: 127.0.1.1 test_host.my_domain.com my_host Signed-off-by: Quentin Armitage <[email protected]>
1 parent d73f92a commit 8008994

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rpi-clone-setup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ echo -e "$LINE\n"
126126
# Edit /etc/hosts - edit the sed command if editing fails for your /etc/hosts.
127127
#
128128
cd $clone/etc
129-
sed -i s/"$HOSTNAME"/"$newhost"/ hosts
129+
sed -i s/"$HOSTNAME"/"$newhost"/g hosts
130130
#
131131
# Read it back to verify.
132132
#

0 commit comments

Comments
 (0)