summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils/postinstall.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils/postinstall.py b/src/utils/postinstall.py
index f52ca77..a043ae8 100644
--- a/src/utils/postinstall.py
+++ b/src/utils/postinstall.py
@@ -69,6 +69,10 @@ def set_windows_hostname(disk, partition, name):
def set_linux_hostname(disk, partition, name):
logging.info(f'Setting Linux hostname to {name}')
+ if len(name) > 64:
+ logging.warning(f'Linux does not permit hostnames that exceed 64 characters. Truncating {name}')
+ name = name[0:64]
+
device = get_partition_device(disk, partition)
mountpoint = device.replace('dev', 'mnt')