mirror of
https://github.com/terem42/zfs-hetzner-vm.git
synced 2025-12-23 07:18:37 +00:00
updated wih testing
This commit is contained in:
@@ -624,7 +624,7 @@ ff02::2 ip6-allrouters
|
|||||||
ff02::3 ip6-allhosts
|
ff02::3 ip6-allhosts
|
||||||
CONF
|
CONF
|
||||||
|
|
||||||
ip6addr_prefix=$(ip -6 a s | grep -E "inet6.+global" | sed -nE 's/.+inet6\s(([0-9a-z]{1,4}:){4,4}).+/\1/p')
|
ip6addr_prefix=$(ip -6 a s | grep -E "inet6.+global" | sed -nE 's/.+inet6\s(([0-9a-z]{1,4}:){4,4}).+/\1/p' | head -n 1)
|
||||||
|
|
||||||
cat <<CONF > /mnt/etc/systemd/network/10-eth0.network
|
cat <<CONF > /mnt/etc/systemd/network/10-eth0.network
|
||||||
[Match]
|
[Match]
|
||||||
|
|||||||
@@ -625,7 +625,7 @@ ff02::2 ip6-allrouters
|
|||||||
ff02::3 ip6-allhosts
|
ff02::3 ip6-allhosts
|
||||||
CONF
|
CONF
|
||||||
|
|
||||||
ip6addr_prefix=$(ip -6 a s | grep -E "inet6.+global" | sed -nE 's/.+inet6\s(([0-9a-z]{1,4}:){4,4}).+/\1/p')
|
ip6addr_prefix=$(ip -6 a s | grep -E "inet6.+global" | sed -nE 's/.+inet6\s(([0-9a-z]{1,4}:){4,4}).+/\1/p' | head -n 1)
|
||||||
|
|
||||||
cat <<CONF > /mnt/etc/systemd/network/10-eth0.network
|
cat <<CONF > /mnt/etc/systemd/network/10-eth0.network
|
||||||
[Match]
|
[Match]
|
||||||
|
|||||||
@@ -628,7 +628,7 @@ ff02::2 ip6-allrouters
|
|||||||
ff02::3 ip6-allhosts
|
ff02::3 ip6-allhosts
|
||||||
CONF
|
CONF
|
||||||
|
|
||||||
ip6addr_prefix=$(ip -6 a s | grep -E "inet6.+global" | sed -nE 's/.+inet6\s(([0-9a-z]{1,4}:){4,4}).+/\1/p')
|
ip6addr_prefix=$(ip -6 a s | grep -E "inet6.+global" | sed -nE 's/.+inet6\s(([0-9a-z]{1,4}:){4,4}).+/\1/p' | head -n 1)
|
||||||
|
|
||||||
cat <<CONF > /mnt/etc/systemd/network/10-eth0.network
|
cat <<CONF > /mnt/etc/systemd/network/10-eth0.network
|
||||||
[Match]
|
[Match]
|
||||||
|
|||||||
@@ -592,7 +592,7 @@ ff02::2 ip6-allrouters
|
|||||||
ff02::3 ip6-allhosts
|
ff02::3 ip6-allhosts
|
||||||
CONF
|
CONF
|
||||||
|
|
||||||
ip6addr_prefix=$(ip -6 a s | grep -E "inet6.+global" | sed -nE 's/.+inet6\s(([0-9a-z]{1,4}:){4,4}).+/\1/p')
|
ip6addr_prefix=$(ip -6 a s | grep -E "inet6.+global" | sed -nE 's/.+inet6\s(([0-9a-z]{1,4}:){4,4}).+/\1/p' | head -n 1)
|
||||||
|
|
||||||
cat <<CONF > /mnt/etc/systemd/network/10-eth0.network
|
cat <<CONF > /mnt/etc/systemd/network/10-eth0.network
|
||||||
[Match]
|
[Match]
|
||||||
@@ -607,7 +607,7 @@ CONF
|
|||||||
chroot_execute "systemctl enable systemd-networkd.service"
|
chroot_execute "systemctl enable systemd-networkd.service"
|
||||||
chroot_execute "systemctl enable systemd-resolved.service"
|
chroot_execute "systemctl enable systemd-resolved.service"
|
||||||
|
|
||||||
cp /etc/resolv.conf $c_zfs_mount_dir/etc/resolv.conf
|
#cp /etc/resolv.conf $c_zfs_mount_dir/etc/resolv.conf
|
||||||
|
|
||||||
mkdir -p "$c_zfs_mount_dir/etc/cloud/cloud.cfg.d/"
|
mkdir -p "$c_zfs_mount_dir/etc/cloud/cloud.cfg.d/"
|
||||||
cat > "$c_zfs_mount_dir/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg" <<CONF
|
cat > "$c_zfs_mount_dir/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg" <<CONF
|
||||||
|
|||||||
@@ -592,7 +592,7 @@ ff02::2 ip6-allrouters
|
|||||||
ff02::3 ip6-allhosts
|
ff02::3 ip6-allhosts
|
||||||
CONF
|
CONF
|
||||||
|
|
||||||
ip6addr_prefix=$(ip -6 a s | grep -E "inet6.+global" | sed -nE 's/.+inet6\s(([0-9a-z]{1,4}:){4,4}).+/\1/p')
|
ip6addr_prefix=$(ip -6 a s | grep -E "inet6.+global" | sed -nE 's/.+inet6\s(([0-9a-z]{1,4}:){4,4}).+/\1/p' | head -n 1)
|
||||||
|
|
||||||
cat <<CONF > /mnt/etc/systemd/network/10-eth0.network
|
cat <<CONF > /mnt/etc/systemd/network/10-eth0.network
|
||||||
[Match]
|
[Match]
|
||||||
|
|||||||
@@ -593,7 +593,7 @@ ff02::2 ip6-allrouters
|
|||||||
ff02::3 ip6-allhosts
|
ff02::3 ip6-allhosts
|
||||||
CONF
|
CONF
|
||||||
|
|
||||||
ip6addr_prefix=$(ip -6 a s | grep -E "inet6.+global" | sed -nE 's/.+inet6\s(([0-9a-z]{1,4}:){4,4}).+/\1/p')
|
ip6addr_prefix=$(ip -6 a s | grep -E "inet6.+global" | sed -nE 's/.+inet6\s(([0-9a-z]{1,4}:){4,4}).+/\1/p' | head -n 1)
|
||||||
|
|
||||||
cat <<CONF > /mnt/etc/systemd/network/10-eth0.network
|
cat <<CONF > /mnt/etc/systemd/network/10-eth0.network
|
||||||
[Match]
|
[Match]
|
||||||
|
|||||||
Reference in New Issue
Block a user