Commit 33ac4c0e authored by Server Team's avatar Server Team
Browse files

use /root/machine.conf

parent 045c1ec2
#!/bin/bash
SERVER_NAME="srv167"
MACHINE_CONF_FILE="/root/machine.conf"
if [ ! -f "$MACHINE_CONF_FILE" ]; then
echo "you must supply the path to a config file"
exit 99
fi
source $MACHINE_CONF_FILE
# we should now have the following variables
echo "SERVER_NAME $SERVER_NAME"
echo "NET_IPV4_MAC $NET_IPV4_MAC"
echo "NET_IPV4_ADDRESS $NET_IPV4_ADDRESS"
echo "NET_IPV4_GATEWAY $NET_IPV4_GATEWAY"
echo "NET_IPV4_BROADCAST $NET_IPV4_BROADCAST"
echo "NET_IPV4_NETMASK $NET_IPV4_NETMASK"
read -p "Do you cant to creat a machine with this config? " -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi
NET_IPV4_MAC="00:50:56:00:59:34"
NET_IPV4_ADDRESS="46.4.110.202"
NET_IPV4_GATEWAY="46.4.110.201"
NET_IPV4_BROADCAST="46.4.110.207"
NET_IPV4_NETMASK="255.255.255.248"
exit 99
###########################################
###########################################
......
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