Merge pull request #58 from Jip-Hop/develop

Version 1.0.1
This commit is contained in:
Jip-Hop 2023-11-18 18:21:13 +01:00 committed by GitHub
commit b86a4a1788
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,7 @@ IT COMES WITHOUT WARRANTY AND IS NOT SUPPORTED BY IXSYSTEMS.{NORMAL}"""
DESCRIPTION = "Create persistent Linux 'jails' on TrueNAS SCALE, with full access to all files \ DESCRIPTION = "Create persistent Linux 'jails' on TrueNAS SCALE, with full access to all files \
via bind mounts, thanks to systemd-nspawn!" via bind mounts, thanks to systemd-nspawn!"
VERSION = '1.0.0' VERSION = '1.0.1'
JAILS_DIR_PATH = 'jails' JAILS_DIR_PATH = 'jails'
JAIL_CONFIG_NAME = 'config' JAIL_CONFIG_NAME = 'config'
@ -765,10 +765,10 @@ def create_jail(jail_name, distro='debian', release='bookworm'):
# Override the default 80-container-host0.network file (by using the same name) # Override the default 80-container-host0.network file (by using the same name)
# This config applies when using the --network-bridge option of systemd-nspawn # This config applies when using the --network-bridge option of systemd-nspawn
# Disable LinkLocalAddressing or else the container won't get IP address via DHCP # Disable LinkLocalAddressing on IPv4, or else the container won't get IP address via DHCP
# Enable DHCP only for ipv4 else systemd-networkd will complain that LinkLocalAddressing is disabled # But keep it enabled on IPv6, as SLAAC and DHCPv6 both require a local-link address to function
print(Path(default_host0_network_file).read_text().replace("LinkLocalAddressing=yes", print(Path(default_host0_network_file).read_text().replace("LinkLocalAddressing=yes",
"LinkLocalAddressing=no").replace("DHCP=yes", "DHCP=ipv4"), file=open(override_network_file, 'w')) "LinkLocalAddressing=ipv6"), file=open(override_network_file, 'w'))
# Setup DHCP for macvlan network interfaces # Setup DHCP for macvlan network interfaces
# This config applies when using the --network-macvlan option of systemd-nspawn # This config applies when using the --network-macvlan option of systemd-nspawn
@ -779,8 +779,8 @@ def create_jail(jail_name, distro='debian', release='bookworm'):
Name=mv-* Name=mv-*
[Network] [Network]
DHCP=ipv4 DHCP=yes
LinkLocalAddressing=no LinkLocalAddressing=ipv6
[DHCPv4] [DHCPv4]
UseDNS=true UseDNS=true