Skip to content

Commit

Permalink
Ask the user for the gateway configuration of the foreman network
Browse files Browse the repository at this point in the history
  • Loading branch information
GregSutcliffe committed Jun 5, 2013
1 parent 59ad886 commit 4eeb97b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bin/foreman_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fi
#PUBLIC_CONTROLLER_IP=10.9.9.10
#PUBLIC_INTERFACE=eth2
#PUBLIC_NETMASK=10.9.9.0/24
#FOREMAN_GATEWAY=10.0.0.1 (or false for no gateway)
if [ "x$PRIVATE_CONTROLLER_IP" = "x" ]; then
echo "You must define PRIVATE_CONTROLLER_IP before running this script"
exit 1
Expand All @@ -50,6 +51,12 @@ if [ "x$PUBLIC_NETMASK" = "x" ]; then
echo "You must define PUBLIC_NETMASK before running this script"
exit 1
fi
if [ "x$FOREMAN_GATEWAY" = "x" ]; then
echo "You must define FOREMAN_GATEWAY before running this script"
echo " Use either the gateway IP for the internal Foreman network, or"
echo " use 'false' to have no gateway offered for non-routable networks"
exit 1
fi

if [ "x$SCL_RUBY_HOME" = "x" ]; then
SCL_RUBY_HOME=/opt/rh/ruby193/root
Expand Down Expand Up @@ -146,7 +153,7 @@ if [ "$FOREMAN_PROVISIONING" = "true" ]; then
cat >> installer.pp << EOM
tftp_servername => '$(scl enable ruby193 "facter ipaddress_${SECONDARY_INT}")',
dhcp => true,
dhcp_gateway => false,
dhcp_gateway => '${FOREMAN_GATEWAY}',
dhcp_range => '${SECONDARY_PREFIX}.50 ${SECONDARY_PREFIX}.200',
dhcp_interface => '${SECONDARY_INT}',
Expand Down

0 comments on commit 4eeb97b

Please sign in to comment.