Split off setting hostname

This commit is contained in:
2025-12-24 16:26:47 -05:00
parent 377d56b1cd
commit 8bca55e467
2 changed files with 10 additions and 5 deletions

9
hostname.sh Normal file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
set -euo pipefail
printf \
"${hostname}\n" | tee /mnt/etc/hostname &> /dev/null
printf \
"127.0.1.1\t${hostname}\n" | tee --append /mnt/etc/hosts &> /dev/null

View File

@@ -129,11 +129,7 @@ elif [[ "${ID}" == 'fedora' ]]; then
"${baseDir}/fedora.sh" --rsync
fi
printf \
"${hostname}\n" | tee /mnt/etc/hostname &> /dev/null
printf \
"127.0.1.1\t${hostname}\n" | tee --append /mnt/etc/hosts &> /dev/null
"${baseDir}/hostname.sh"
if [[ "${ID}" == 'debian' ]]; then
"${baseDir}/debian.sh" --network-interfaces