mirror of
https://github.com/hashicorp/packer.git
synced 2026-02-23 18:04:11 -05:00
6 lines
227 B
Bash
6 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
|