Implementato uso di mac2hostname per l'assegnazione degli hostname. Configurati correttamente i metapacchetti in script di ks.

This commit is contained in:
Emiliano Vavassori 2015-06-17 14:07:24 +02:00
parent cbdb82d182
commit e2485452f7
2 changed files with 15 additions and 2 deletions

View File

@ -40,9 +40,16 @@ firewall --disabled
skipx skipx
#Install packages #Install packages
%packages %packages
edubuntu-desktop @ edubuntu-desktop
ubuntu-edu-secondary @ edubuntu-fonts
@ ubuntu-edu-secondary
vim vim
screen screen
cifs-utils cifs-utils
openssh-server openssh-server
#Post installation commands
%post --nochroot
#the target filesystem in nochroot environment is in /target
TARGETHOSTNAME=$(wget -qO- http://{{ serverfqdn }}:3000/whatsmyhostname)
echo $TARGETHOSTNAME > /target/etc/hostname
sed -i "s/kickseed/$TARGETHOSTNAME/g" /target/etc/hosts

View File

@ -42,3 +42,9 @@ skipx
%packages %packages
@ ubuntu-desktop @ ubuntu-desktop
openssh-server openssh-server
#Post installation commands
%post --nochroot
#the target filesystem in nochroot environment is in /target
TARGETHOSTNAME=$(wget -qO- http://{{ serverfqdn }}:3000/whatsmyhostname)
echo $TARGETHOSTNAME > /target/etc/hostname
sed -i "s/kickseed/$TARGETHOSTNAME/g" /target/etc/hosts