Skip to content

Commit

Permalink
fix sample focal setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
mhewedy committed May 25, 2020
1 parent 6bf3ba2 commit 60e4020
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions etc/samples-provision/sample_init_focal.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
sudo hostnamectl set-hostname "$(hostname -I | awk '{print $1}')"

echo "export PS1=\"\[\e[1;35m\]\u\[\033[m\]@\[\e[1;92m\]$(hostname -I | awk '{print $1}')\[\033[m\]:\w \$ \"" >>~/.bashrc

## Fix IP Addr
Expand All @@ -25,7 +24,7 @@ wait_for_apt_lock "sudo apt-get update -y"
wait_for_apt_lock "sudo apt-get install yq -y"
sudo yq w -i /etc/netplan/00-installer-config.yaml network.ethernets.enp0s3.dhcp4 false
sudo yq w -i /etc/netplan/00-installer-config.yaml network.ethernets.enp0s3.addresses[+] "$(hostname -I | awk '{print $1}')/24"
sudo yq w -i /etc/netplan/00-installer-config.yaml network.ethernets.enp0s3.gateway4 192.168.100.1
sudo yq w -i /etc/netplan/00-installer-config.yaml network.ethernets.enp0s3.gateway4 "$(hostname -I | cut -d "." -f 1-3).1"
sudo yq w -i /etc/netplan/00-installer-config.yaml network.ethernets.enp0s3.nameservers.addresses[+] 8.8.8.8
sudo yq w -i /etc/netplan/00-installer-config.yaml network.ethernets.enp0s3.nameservers.addresses[+] 8.8.4.4

Expand Down

0 comments on commit 60e4020

Please sign in to comment.