Split off setting hostname
This commit is contained in:
9
hostname.sh
Normal file
9
hostname.sh
Normal 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
|
||||||
@@ -129,11 +129,7 @@ elif [[ "${ID}" == 'fedora' ]]; then
|
|||||||
"${baseDir}/fedora.sh" --rsync
|
"${baseDir}/fedora.sh" --rsync
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf \
|
"${baseDir}/hostname.sh"
|
||||||
"${hostname}\n" | tee /mnt/etc/hostname &> /dev/null
|
|
||||||
|
|
||||||
printf \
|
|
||||||
"127.0.1.1\t${hostname}\n" | tee --append /mnt/etc/hosts &> /dev/null
|
|
||||||
|
|
||||||
if [[ "${ID}" == 'debian' ]]; then
|
if [[ "${ID}" == 'debian' ]]; then
|
||||||
"${baseDir}/debian.sh" --network-interfaces
|
"${baseDir}/debian.sh" --network-interfaces
|
||||||
|
|||||||
Reference in New Issue
Block a user