mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-19 22:41:40 -04:00
7 lines
227 B
Bash
7 lines
227 B
Bash
HOSTNAME=`ifconfig eth1|grep 'inet addr'|cut -d ":" -f2|cut -d " " -f1`
|
|
if [ not $HOSTNAME ] ; then
|
|
HOSTNAME=`ifconfig eth0|grep 'inet addr'|cut -d ":" -f2|cut -d " " -f1`
|
|
fi
|
|
hostname $HOSTNAME
|
|
chef-server-ctl reconfigure
|