Verified Commit 9678a750 authored by Marco Marinello's avatar Marco Marinello
Browse files

Fix indentation; wait while the server is available

parent 1f451442
......@@ -31,17 +31,21 @@ if [ -e /root/join ]; then
if [ -e /root/new_root_pw ] ; then
echo "root:$(cat /root/new_root_pw)" | chpasswd -e
fi
# Following dhclient was necessary inside a virtual(box) environment. Not sure if needed anymore. In case it can be removed or commented.
# Following dhclient was necessary inside a virtual(box) environment. Not sure if needed anymore. In case it can be removed or commented.
dhclient $myNic
# Wait while the server is discovered
while ! ping -c 1 proxy; do
echo "No ping to proxy... wait 2 more seconds"
sleep 2
done
screen -d -m -S XY
screen -S XY -X stuff "exec 2>&1 > /dev/tty7\n"
screen -S XY -X stuff "fuss-client -av $clusterJoin && rm /root/join ; reboot\n"
else
rm /etc/rc.local
rm /etc/rc.local
rm /root/clientScript
rm -fr /root/.ssh/id_rsa*
rm /root/.ssh/known_hosts
sed -i '/clonezilla/d' /root/.ssh/authorized_keys
rm /root/cluster
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment