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
#Install packages
%packages
edubuntu-desktop
ubuntu-edu-secondary
@ edubuntu-desktop
@ edubuntu-fonts
@ ubuntu-edu-secondary
vim
screen
cifs-utils
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
@ ubuntu-desktop
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