cd /sys/class/net for nic in *; do ip link set $nic up done mkdir -p /custom-installation cp -a /opt/confluent /custom-installation touch /custom-installation/confluent/confluent.info while ! grep NODENAME /custom-installation/confluent/confluent.info; do /opt/confluent/bin/copernicus -t > /custom-installation/confluent/confluent.info done MGR="[$(grep MANAGER: /custom-installation/confluent/confluent.info | head -n 1 | awk '{print $2}')]" osprofile=$(sed -e 's/.*osprofile=//' -e 's/ .*//' /proc/cmdline) cat /proc/cmdline > /custom-installation/confluent/cmdline.orig if [ -f /custom-installation/autocons.info ]; then cons=$(cat /custom-installation/autocons.info) fi if [ ! -z "$cons" ]; then echo "Preparing to deploy $osprofile from $MGR" > ${cons%,*} fi echo "Preparing to deploy $osprofile from $MGR" echo $osprofile > /custom-installation/confluent/osprofile echo URL=http://${MGR}/confluent-public/os/$osprofile/distribution/install.iso >> /conf/param.conf fcmdline="$(cat /custom-installation/confluent/cmdline.orig) url=http://${MGR}/confluent-public/os/$osprofile/distribution/install.iso" if [ ! -z "$cons" ]; then fcmdline="$fcmdline console=${cons#/dev/}" fi echo $fcmdline > /custom-installation/confluent/fakecmdline mount -o bind /custom-installation/confluent/fakecmdline /proc/cmdline