File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ Arch Linux installation are the following:
1818 machines.
1919- Root filesystem is ext4.
2020- Locale is set to en_US.UTF-8 and timezone is set to UTC.
21- - Network is configured through dhclient .
21+ - Network is configured through systemd-networkd .
2222- Systemd-timesyncd is enabled and configured to use the Compute Engine metadata
2323 server.
2424- Pacman keyring is configured to be built and initialized on first boot.
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ append_gce_repo() {
7676cp /etc/pacman.conf " $work_dir "
7777append_gce_repo " $work_dir /pacman.conf"
7878pacstrap -G -M -C " $work_dir /pacman.conf" -- " $mount_dir " \
79- base linux dosfstools e2fsprogs dhclient openssh sudo google-compute-engine
79+ base linux dosfstools e2fsprogs openssh sudo google-compute-engine
8080append_gce_repo " $mount_dir /etc/pacman.conf"
8181
8282echo ' - Configuring fstab.'
@@ -113,6 +113,22 @@ arch-chroot -- "$mount_dir" /bin/bash -s <<-'EOS'
113113 locale-gen
114114 echo 'LANG=en_US.UTF-8' > /etc/locale.conf
115115
116+ echo '-- Configuring network.'
117+ cat <<-'EOF' > /etc/systemd/network/05-eth0.network
118+ [Match]
119+ Name=eth0
120+
121+ [Network]
122+ DHCP=yes
123+
124+ [DHCPv4]
125+ UseDomains=yes
126+
127+ [DHCPv6]
128+ UseDomains=yes
129+ EOF
130+ systemctl --quiet enable systemd-networkd.service systemd-resolved.service
131+
116132 echo '-- Configuring journald.'
117133 gawk -i assert -i inplace '
118134 /^#ForwardToConsole=/ { $0 = "ForwardToConsole=yes"; ++f }
@@ -159,9 +175,6 @@ arch-chroot -- "$mount_dir" /bin/bash -s <<-'EOS'
159175160176 EOF
161177
162- echo '-- Enabling other services.'
163- systemctl --quiet enable [email protected] 164-
165178 echo '-- Configuring initcpio.'
166179 gawk -i assert -i inplace '
167180 /^MODULES=/ { $0 = "MODULES=(virtio_pci virtio_scsi sd_mod ext4)"; ++f1 }
You can’t perform that action at this time.
0 commit comments